]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: Fix build on MacOSX 10.8 (Mountain Lion)
authorHasso Tepper <hasso.tepper@gmail.com>
Sun, 13 Jan 2013 17:45:29 +0000 (17:45 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 15 Jan 2013 16:57:03 +0000 (17:57 +0100)
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 <netinet/in.h>.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac
lib/zebra.h

index 51bc8bd78c62656c91c820d432601930e33700d2..92c831ab47b82a510de19500f80b5185e3c25d95 100755 (executable)
@@ -472,6 +472,9 @@ m4_define([QUAGGA_INCLUDES],
 #if HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
+#ifdef __APPLE__
+# define __APPLE_USE_RFC_3542
+#endif
 #if HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif
index 404b832b0b11f28277a702d3be23f12944041c41..ffca7a8fbc035518fa43e4a0e3f2643b9eb03d15 100644 (file)
@@ -142,6 +142,10 @@ typedef int socklen_t;
 #include <sys/sockio.h>
 #endif /* HAVE_SYS_SOCKIO_H */
 
+#ifdef __APPLE__
+#define __APPLE_USE_RFC_3542
+#endif
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif /* HAVE_NETINET_IN_H */