[PATCH 08/12] Define IP_MULTICAST_ALL if header files don't have it

Mikko Rapeli <[email protected]>
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
Older systems have it defined in <linux/in.h> which conflicts with
<netinet/in.h>.

Signed-off-by: Mikko Rapeli <[email protected]>
---
 net/ip_setsockopt.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/ip_setsockopt.c b/net/ip_setsockopt.c
index 3d7c126..af4b873 100644
--- a/net/ip_setsockopt.c
+++ b/net/ip_setsockopt.c
@@ -12,6 +12,11 @@
 #include "random.h"
 #include "trinity.h"	// ARRAY_SIZE
 
+/* workaround for <linux/in.h> vs. <netinet/in.h> */
+#ifndef IP_MULTICAST_ALL
+#define IP_MULTICAST_ALL 49
+#endif
+
 #define NR_SOL_IP_OPTS ARRAY_SIZE(ip_opts)
 static const unsigned int ip_opts[] = { IP_TOS, IP_TTL, IP_HDRINCL, IP_OPTIONS,
 	IP_ROUTER_ALERT, IP_RECVOPTS, IP_RETOPTS, IP_PKTINFO,
-- 
1.7.9.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.