From: Hasso Tepper Date: Sun, 13 Jan 2013 17:45:29 +0000 (+0000) Subject: build: Fix build on MacOSX 10.8 (Mountain Lion) X-Git-Tag: frr-2.0-rc1~1705 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ea05767770d759d46f97d1dc33423de72ae20ccd;p=matthieu%2Ffrr.git build: Fix build on MacOSX 10.8 (Mountain Lion) Newer MacOSX versions have support for both IPv6 advanced socket API RFCs (2292 and 3542) switchable in compile time, but neither of these is default for some strange reason. RFC3542 will be default in future, but for now we have to declare that we want to use the RFC3542 API before including . Signed-off-by: David Lamparter --- diff --git a/configure.ac b/configure.ac index 51bc8bd78c..92c831ab47 100755 --- a/configure.ac +++ b/configure.ac @@ -472,6 +472,9 @@ m4_define([QUAGGA_INCLUDES], #if HAVE_SYS_SOCKET_H # include #endif +#ifdef __APPLE__ +# define __APPLE_USE_RFC_3542 +#endif #if HAVE_NETINET_IN_H # include #endif diff --git a/lib/zebra.h b/lib/zebra.h index 404b832b0b..ffca7a8fbc 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -142,6 +142,10 @@ typedef int socklen_t; #include #endif /* HAVE_SYS_SOCKIO_H */ +#ifdef __APPLE__ +#define __APPLE_USE_RFC_3542 +#endif + #ifdef HAVE_NETINET_IN_H #include #endif /* HAVE_NETINET_IN_H */