From c376ac1ebdf7779ab2dba5f2f227347a4cc775fd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 29 Jan 2013 12:13:59 +0900 Subject: [PATCH] Add some #define magic for SOL_IP on BSD-based stacks. --- libs/net/nm/net_udp.c | 6 ++++++ qw/source/master.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libs/net/nm/net_udp.c b/libs/net/nm/net_udp.c index 4d8824078..84f01a3a9 100644 --- a/libs/net/nm/net_udp.c +++ b/libs/net/nm/net_udp.c @@ -97,6 +97,12 @@ #include "netmain.h" #include "net_udp.h" +#ifdef HAVE_IN_PKTINFO +# ifndef SOL_IP // BSD-based stacks don't define this. +# define SOL_IP IPPROTO_IP +# endif +#endif + #ifdef _WIN32 # undef EWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK diff --git a/qw/source/master.c b/qw/source/master.c index 549cd8712..91347ff0a 100644 --- a/qw/source/master.c +++ b/qw/source/master.c @@ -70,6 +70,12 @@ #include "qw/protocol.h" +#ifdef HAVE_IN_PKTINFO +# ifndef SOL_IP // BSD-based stacks don't define this. +# define SOL_IP IPPROTO_IP +# endif +#endif + static void __attribute__ ((format (printf, 1, 2))) ma_log (const char *fmt, ...);