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, ...);