From 810090517bb56a89a4b8ec4cc7fa21d8da008d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Wed, 19 Aug 2015 14:48:37 +0200 Subject: [PATCH] _GNU_SOURCE for setresuid() --- sysdep/linux/syspriv.h | 4 ++++ sysdep/unix/io.c | 4 +++- sysdep/unix/main.c | 2 +- sysdep/unix/main_helper.c | 2 +- sysdep/unix/main_helper.h | 4 ++++ 5 files changed, 13 insertions(+), 3 deletions(-) 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"