aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-03 20:31:43 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-03 20:31:43 -0800
commit78d1fd07d27a2ac28eca792933e052cb1fe1fa17 (patch)
tree017de9938e68ad326941ba6b217a8058421e400c
parentdcf661a130ac868c9004369618caec05156741f1 (diff)
parent9e1b10b027308894d484c154658933eb415eb0c4 (diff)
Merge pull request #380 from dklempner/cpu_linux_build
Have cpu_linux.c define _GNU_SOURCE at the beginning of the file
-rw-r--r--src/core/support/cpu_linux.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/src/core/support/cpu_linux.c b/src/core/support/cpu_linux.c
index eab8b7fbd0..ad82174894 100644
--- a/src/core/support/cpu_linux.c
+++ b/src/core/support/cpu_linux.c
@@ -31,44 +31,17 @@
*
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif /* _GNU_SOURCE */
+
#include <grpc/support/port_platform.h>
#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 <sched.h>
-
-#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 <errno.h>
#include <unistd.h>
#include <string.h>