From: Jo-Philipp Wich Date: Thu, 23 Aug 2018 07:36:06 +0000 (+0200) Subject: build: avoid redefining _DEFAULT_SOURCE X-Git-Url: http://git.openwrt.org/?p=project%2Fuhttpd.git;a=commitdiff_plain;h=77b774b30f9125e77137c57a2ff86de57361d947 build: avoid redefining _DEFAULT_SOURCE Work around further glibc toolchain annoyances. Signed-off-by: Jo-Philipp Wich --- diff --git a/file.c b/file.c index 2f829f1..b73fd47 100644 --- a/file.c +++ b/file.c @@ -17,7 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE +#ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE +#define + #define _BSD_SOURCE #define _DARWIN_C_SOURCE #define _XOPEN_SOURCE 700 diff --git a/main.c b/main.c index 6574c15..219e37e 100644 --- a/main.c +++ b/main.c @@ -17,7 +17,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE +#ifndef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE +#endif + #define _BSD_SOURCE #define _GNU_SOURCE #define _XOPEN_SOURCE 700