Add some #define magic for SOL_IP on BSD-based stacks.

This commit is contained in:
Bill Currie 2013-01-29 12:13:59 +09:00
parent 8de4db0e2d
commit c376ac1ebd
2 changed files with 12 additions and 0 deletions

View file

@ -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

View file

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