From 0718b5624c20132450ba39454a8e245bc543281b Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 28 Aug 2018 11:40:57 +0200 Subject: [PATCH] build: use _POSIX_C_SOURCE 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 --- configure.ac | 8 ++------ lib/zebra.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 326794f2cc..e6ca7d9589 100755 --- a/configure.ac +++ b/configure.ac @@ -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 @@ -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) diff --git a/lib/zebra.h b/lib/zebra.h index 7b7a42d908..d80aa06935 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -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; -- 2.39.5