xserver: Branch 'master'
Alan Coopersmith
alanc at kemper.freedesktop.org
Tue Mar 4 16:15:21 PST 2008
os/access.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
New commits:
commit cf984dcc156958d4f8d98110e7add150628ce97e
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Mar 4 16:03:04 2008 -0800
Make sure SIOGLIFCONF buffer is properly aligned for socket structures
diff --git a/os/access.c b/os/access.c
index e91dd37..db14380 100644
--- a/os/access.c
+++ b/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;
More information about the xorg-commit
mailing list