]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: use _POSIX_C_SOURCE
authorDavid Lamparter <equinox@diac24.net>
Tue, 28 Aug 2018 09:40:57 +0000 (11:40 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sat, 8 Sep 2018 19:30:42 +0000 (21:30 +0200)
Need this to get CMSG_SPACE/CMSG_LEN on Solaris.

Also, AC_GNU_SOURCE is deprecated, AC_USE_SYSTEM_EXTENSIONS does that.

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

index 326794f2cc2b82961685daa19f8ad8426df804dc..e6ca7d95893ee5ff1732fac5109e9b31212543a4 100755 (executable)
@@ -298,11 +298,6 @@ AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_CHECK_TOOL(AR, ar)
 
-dnl -----------------
-dnl System extensions
-dnl -----------------
-AC_GNU_SOURCE
-
 dnl -------
 dnl libtool
 dnl -------
@@ -823,7 +818,7 @@ int main(int argc, char **argv) {
 dnl Utility macro to avoid retyping includes all the time
 m4_define([FRR_INCLUDES],
 [#ifdef SUNOS_5
-#define _XPG4_2
+#define _POSIX_C_SOURCE 200809L
 #define __EXTENSIONS__
 #endif
 #include <stdio.h>
@@ -916,6 +911,7 @@ case "$host_os" in
 
     AC_DEFINE(SUNOS_5, 1, [SunOS 5])
     AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6)
+    AC_DEFINE(_POSIX_C_SOURCE, 200809L, [enable POSIX.1-2008 and XPG7/SUSv4])
 
     AC_CHECK_LIB(socket, main)
     AC_CHECK_LIB(nsl, main)
index 7b7a42d908974cd1101580d120be59a2edd14762..d80aa06935500d11e032fea227ea8dcb2006bcb0 100644 (file)
@@ -28,7 +28,6 @@
 #include "compiler.h"
 
 #ifdef SUNOS_5
-#define _XPG4_2
 typedef unsigned int uint32_t;
 typedef unsigned short uint16_t;
 typedef unsigned char uint8_t;