aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/support/cpu_linux.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-01-12 17:47:59 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-01-12 17:47:59 -0800
commit9fef05c2f07a20c2e32746cd4bbb14e85e1e64fc (patch)
tree01e17cab0b167ba617ff2c6bf85e8b22849efc2b /src/core/support/cpu_linux.c
parent225d31fd4068cfe162a122b809d3e2f99dd56e56 (diff)
parent6ad120e435069656af0394dc0b97744701cac51c (diff)
Merge github.com:google/grpc
Diffstat (limited to 'src/core/support/cpu_linux.c')
-rw-r--r--src/core/support/cpu_linux.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/support/cpu_linux.c b/src/core/support/cpu_linux.c
index 4d538a5b1b..922b61c3c5 100644
--- a/src/core/support/cpu_linux.c
+++ b/src/core/support/cpu_linux.c
@@ -37,13 +37,37 @@
#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>