Merge pull request #380 from dklempner/cpu_linux_build

Have cpu_linux.c define _GNU_SOURCE at the beginning of the file
pull/392/head
Craig Tiller 10 years ago
commit 78d1fd07d2
  1. 35
      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> #include <grpc/support/port_platform.h>
#ifdef GPR_CPU_LINUX #ifdef GPR_CPU_LINUX
#include "src/core/support/cpu.h" #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> #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 <errno.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>

Loading…
Cancel
Save