mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
Make sure SIOGLIFCONF buffer is properly aligned for socket structures
This commit is contained in:
18
os/access.c
18
os/access.c
@@ -713,19 +713,21 @@ void
|
||||
DefineSelf (int fd)
|
||||
{
|
||||
#ifndef HAS_GETIFADDRS
|
||||
char buf[2048], *cp, *cplim;
|
||||
void * bufptr = buf;
|
||||
#ifdef USE_SIOCGLIFCONF
|
||||
char *cp, *cplim;
|
||||
# ifdef USE_SIOCGLIFCONF
|
||||
struct sockaddr_storage buf[16];
|
||||
struct lifconf ifc;
|
||||
register struct lifreq *ifr;
|
||||
#ifdef SIOCGLIFNUM
|
||||
# ifdef SIOCGLIFNUM
|
||||
struct lifnum ifn;
|
||||
#endif
|
||||
#else
|
||||
# endif
|
||||
# else /* !USE_SIOCGLIFCONF */
|
||||
char buf[2048];
|
||||
struct ifconf ifc;
|
||||
register struct ifreq *ifr;
|
||||
#endif
|
||||
#else
|
||||
# endif
|
||||
void * bufptr = buf;
|
||||
#else /* HAS_GETIFADDRS */
|
||||
struct ifaddrs * ifap, *ifr;
|
||||
#endif
|
||||
int len;
|
||||
|
||||
Reference in New Issue
Block a user