This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.25-229-g2288c26


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2288c2674d050cbbe96a3eb00e7dda1452160c32 (commit)
      from  4cb334c4d6249686653137ec273d081371b3672d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2288c2674d050cbbe96a3eb00e7dda1452160c32

commit 2288c2674d050cbbe96a3eb00e7dda1452160c32
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Apr 18 21:22:51 2017 +0000

    Fix bits/socket.h IOC* namespace issues (bug 21267).
    
    sysdeps/unix/sysv/linux/bits/socket.h includes asm/socket.h.  That
    includes asm/sockios.h, which on MIPS includes asm/ioctl.h, resulting
    in namespace violations from IOC* macros.
    
    bits/socket.h already has code to handle asm/socket.h unconditionally
    defining macros that are only wanted for __USE_MISC.  This patch
    extends it to handle the IOC* macros as well (always undefining them
    if not defined when bits/socket.h was included, as I don't think they
    are part of the intended API even for __USE_MISC).
    
    It's possible there should also be a kernel fix - it's not clear to me
    that IOC* belong in the uapi headers, and even if they do they might
    best be split out into another header to avoid getting defined by this
    particular path.  But since glibc needs to deal with existing kernel
    headers, it also seems appropriate to extend the existing workaround
    to these macros.
    
    Tested (compilation only) with build-many-glibcs.py.
    
    	[BZ #21267]
    	* sysdeps/unix/sysv/linux/bits/socket.h (IOCSIZE_MASK): Undefine
    	if defined by <asm/socket.h> and not previously defined.
    	(IOCSIZE_SHIFT): Likewise.
    	(IOC_IN): Likewise.
    	(IOC_INOUT): Likewise.
    	(IOC_OUT): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 677e5e2..7264a9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-04-18  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #21267]
+	* sysdeps/unix/sysv/linux/bits/socket.h (IOCSIZE_MASK): Undefine
+	if defined by <asm/socket.h> and not previously defined.
+	(IOCSIZE_SHIFT): Likewise.
+	(IOC_IN): Likewise.
+	(IOC_INOUT): Likewise.
+	(IOC_OUT): Likewise.
+
 2017-04-18  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #21396]
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 0f1b786..6d6d56e 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -365,6 +365,21 @@ struct ucred
 #  define __SYS_SOCKET_H_undef_SIOCSPGRP
 # endif
 #endif
+#ifndef IOCSIZE_MASK
+# define __SYS_SOCKET_H_undef_IOCSIZE_MASK
+#endif
+#ifndef IOCSIZE_SHIFT
+# define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
+#endif
+#ifndef IOC_IN
+# define __SYS_SOCKET_H_undef_IOC_IN
+#endif
+#ifndef IOC_INOUT
+# define __SYS_SOCKET_H_undef_IOC_INOUT
+#endif
+#ifndef IOC_OUT
+# define __SYS_SOCKET_H_undef_IOC_OUT
+#endif
 
 /* Get socket manipulation related informations from kernel headers.  */
 #include <asm/socket.h>
@@ -399,6 +414,26 @@ struct ucred
 #  undef SIOCSPGRP
 # endif
 #endif
+#ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK
+# undef __SYS_SOCKET_H_undef_IOCSIZE_MASK
+# undef IOCSIZE_MASK
+#endif
+#ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
+# undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT
+# undef IOCSIZE_SHIFT
+#endif
+#ifdef __SYS_SOCKET_H_undef_IOC_IN
+# undef __SYS_SOCKET_H_undef_IOC_IN
+# undef IOC_IN
+#endif
+#ifdef __SYS_SOCKET_H_undef_IOC_INOUT
+# undef __SYS_SOCKET_H_undef_IOC_INOUT
+# undef IOC_INOUT
+#endif
+#ifdef __SYS_SOCKET_H_undef_IOC_OUT
+# undef __SYS_SOCKET_H_undef_IOC_OUT
+# undef IOC_OUT
+#endif
 
 /* Structure used to manipulate the SO_LINGER option.  */
 struct linger

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                             |   10 +++++++++
 sysdeps/unix/sysv/linux/bits/socket.h |   35 +++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]