diff mbox

Fix netinet/in.h MCAST_* namespace (bug 18558)

Message ID alpine.DEB.2.10.1506181741060.31642@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers June 18, 2015, 5:45 p.m. UTC
sysdeps/unix/sysv/linux/bits/in.h (as included in netinet/in.h, and
via that in netdb.h and arpa/inet.h) defines a series of MCAST_*
macros, both under __USE_MISC and then again unconditionally.  These
are not POSIX macros, nor in any of the namespaces listed in POSIX as
reserved for this header, so should not be defined unconditionally.
This patch duly removes the unconditional definitions, leaving the
ones conditional on __USE_MISC.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

2015-06-18  Joseph Myers  <joseph@codesourcery.com>

	[BZ #18558]
	* sysdeps/unix/sysv/linux/bits/in.h (MCAST_JOIN_GROUP): Remove
	unconditional definition.
	(MCAST_BLOCK_SOURCE): Likewise.
	(MCAST_UNBLOCK_SOURCE): Likewise.
	(MCAST_LEAVE_GROUP): Likewise.
	(MCAST_JOIN_SOURCE_GROUP): Likewise.
	(MCAST_LEAVE_SOURCE_GROUP): Likewise.
	(MCAST_MSFILTER): Likewise.
	* conform/Makefile (test-xfail-XOPEN2K/arpa/inet.h/conform):
	Remove variable.
	(test-xfail-XOPEN2K/netdb.h/conform): Likewise.
	(test-xfail-XOPEN2K/netinet/in.h/conform): Likewise.
	(test-xfail-XOPEN2K8/arpa/inet.h/conform): Likewise.
	(test-xfail-XOPEN2K8/netdb.h/conform): Likewise.
	(test-xfail-XOPEN2K8/netinet/in.h/conform): Likewise.

Comments

Roland McGrath June 18, 2015, 7:41 p.m. UTC | #1
OK
diff mbox

Patch

diff --git a/conform/Makefile b/conform/Makefile
index 4bc8121..30eaa64 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -231,13 +231,10 @@  test-xfail-UNIX98/ucontext.h/conform = yes
 test-xfail-UNIX98/unistd.h/conform = yes
 test-xfail-UNIX98/utmpx.h/conform = yes
 test-xfail-XOPEN2K/aio.h/conform = yes
-test-xfail-XOPEN2K/arpa/inet.h/conform = yes
 test-xfail-XOPEN2K/fcntl.h/conform = yes
 test-xfail-XOPEN2K/langinfo.h/conform = yes
 test-xfail-XOPEN2K/math.h/conform = yes
 test-xfail-XOPEN2K/mqueue.h/conform = yes
-test-xfail-XOPEN2K/netdb.h/conform = yes
-test-xfail-XOPEN2K/netinet/in.h/conform = yes
 test-xfail-XOPEN2K/semaphore.h/conform = yes
 test-xfail-XOPEN2K/signal.h/conform = yes
 test-xfail-XOPEN2K/stdarg.h/conform = yes
@@ -261,12 +258,9 @@  test-xfail-POSIX2008/signal.h/conform = yes
 test-xfail-POSIX2008/stropts.h/conform = yes
 test-xfail-POSIX2008/sys/socket.h/conform = yes
 test-xfail-POSIX2008/sys/wait.h/conform = yes
-test-xfail-XOPEN2K8/arpa/inet.h/conform = yes
 test-xfail-XOPEN2K8/fcntl.h/conform = yes
 test-xfail-XOPEN2K8/limits.h/conform = yes
 test-xfail-XOPEN2K8/math.h/conform = yes
-test-xfail-XOPEN2K8/netdb.h/conform = yes
-test-xfail-XOPEN2K8/netinet/in.h/conform = yes
 test-xfail-XOPEN2K8/signal.h/conform = yes
 test-xfail-XOPEN2K8/stdio.h/conform = yes
 test-xfail-XOPEN2K8/stropts.h/conform = yes
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
index b1d2cf6..43db11c 100644
--- a/sysdeps/unix/sysv/linux/bits/in.h
+++ b/sysdeps/unix/sysv/linux/bits/in.h
@@ -114,13 +114,6 @@ 
 #define IP_ADD_SOURCE_MEMBERSHIP	39
 #define IP_DROP_SOURCE_MEMBERSHIP	40
 #define IP_MSFILTER			41
-#define MCAST_JOIN_GROUP		42
-#define MCAST_BLOCK_SOURCE		43
-#define MCAST_UNBLOCK_SOURCE		44
-#define MCAST_LEAVE_GROUP		45
-#define MCAST_JOIN_SOURCE_GROUP		46
-#define MCAST_LEAVE_SOURCE_GROUP	47
-#define MCAST_MSFILTER			48
 #define IP_MULTICAST_ALL		49
 #define IP_UNICAST_IF			50