diff --git a/sysdep/linux/syspriv.h b/sysdep/linux/syspriv.h index 51bef731..8b210f06 100644 --- a/sysdep/linux/syspriv.h +++ b/sysdep/linux/syspriv.h @@ -1,6 +1,10 @@ #ifndef _BIRD_SYSPRIV_H_ #define _BIRD_SYSPRIV_H_ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include #include #include diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 78faa186..20a40547 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -9,7 +9,9 @@ /* Unfortunately, some glibc versions hide parts of RFC 3542 API if _GNU_SOURCE is not defined. */ -#define _GNU_SOURCE 1 +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include #include diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 938190ef..eb33a566 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -7,7 +7,7 @@ */ #ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 +#define _GNU_SOURCE #endif #include diff --git a/sysdep/unix/main_helper.c b/sysdep/unix/main_helper.c index 0af7b80a..7b71bed1 100644 --- a/sysdep/unix/main_helper.c +++ b/sysdep/unix/main_helper.c @@ -9,7 +9,7 @@ #undef LOCAL_DEBUG #ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 +#define _GNU_SOURCE #endif #include diff --git a/sysdep/unix/main_helper.h b/sysdep/unix/main_helper.h index 3beea1dc..1e991a22 100644 --- a/sysdep/unix/main_helper.h +++ b/sysdep/unix/main_helper.h @@ -9,6 +9,10 @@ #ifndef _BIRD_MAIN_HELPER_H_ #define _BIRD_MAIN_HELPER_H_ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include "lib/birdlib.h" #include "lib/socket.h" #include "sysdep/config.h"