From d44f8410dfeb114e05a44166ea0d9271438eac38 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Tue, 3 Feb 2015 18:30:48 -0800 Subject: [PATCH] Have cpu_linux.c define _GNU_SOURCE at the beginning of the file Feature test macros need to be defined before including any other headers. --- src/core/support/cpu_linux.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/core/support/cpu_linux.c b/src/core/support/cpu_linux.c index eab8b7fbd05..508ebfaebde 100644 --- a/src/core/support/cpu_linux.c +++ b/src/core/support/cpu_linux.c @@ -31,44 +31,15 @@ * */ +#define _GNU_SOURCE + #include #ifdef GPR_CPU_LINUX #include "src/core/support/cpu.h" -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#define GRPC_GNU_SOURCE -#endif - -#ifndef __USE_GNU -#define __USE_GNU -#define GRPC_USE_GNU -#endif - -#ifndef __USE_MISC -#define __USE_MISC -#define GRPC_USE_MISC -#endif - #include - -#ifdef GRPC_GNU_SOURCE -#undef _GNU_SOURCE -#undef GRPC_GNU_SOURCE -#endif - -#ifdef GRPC_USE_GNU -#undef __USE_GNU -#undef GRPC_USE_GNU -#endif - -#ifdef GRPC_USE_MISC -#undef __USE_MISC -#undef GRPC_USE_MISC -#endif - #include #include #include