From c6ddb3e4ca72f6ec8662f8a18674eb4d861561b8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 10 Feb 2014 13:03:50 +0000 Subject: [PATCH 3/4] always define _GNU_SOURCE for linux We are using various extenstions that the spec say depends on _GNU_SOURCE, for example unshare, CPU_SET, CPU_ZERO, cpu_set_t. We enable those always for linux and we never unset it. Signed-off-by: Natanael Copa --- uwsgi.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/uwsgi.h b/uwsgi.h index b3ce4f7..3131a0f 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -149,29 +149,22 @@ extern "C" { #endif #endif +#ifdef __linux__ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif -#include -#ifdef __UCLIBC__ -#include +#ifndef __USE_GNU +#define __USE_GNU +#endif #endif -#undef _GNU_SOURCE +#include #include #include #include #include #include -#ifdef __linux__ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#ifndef __USE_GNU -#define __USE_GNU -#endif -#endif #include #include #ifdef __linux__ @@ -179,7 +172,6 @@ extern "C" { #define MSG_FASTOPEN 0x20000000 #endif #endif -#undef _GNU_SOURCE #include #include -- 1.8.5.3