Define _GNU_SOURCE for all implementation files rather than getcpu.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 15 Feb 2012 00:12:35 +0000 (19:12 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 15 Feb 2012 00:12:35 +0000 (19:12 -0500)
If implementation files include the sched.h header prior to having
_GNU_SOURCE defined by getcpu.h, we get in a situation where
sched_getcpu() can be undeclared.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/ltt-ring-buffer-client.h
liblttng-ust/ltt-ring-buffer-metadata-client.h
libringbuffer/getcpu.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/smp.c

index ce9d263ce6c7be248c534564973de1ce0ce1a5f7..7e853992f6c7d8accbf02450a856ba17f6de2df8 100644 (file)
@@ -8,6 +8,7 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
+#define _GNU_SOURCE
 #include <stdint.h>
 #include <lttng/ust-events.h>
 #include "lttng/bitfield.h"
index 7e79b116fa613a672be0efaeb0a2c1987536c762..3fa785a2265e7c2381931ba0e938c2f9f402c4ba 100644 (file)
@@ -8,6 +8,7 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
+#define _GNU_SOURCE
 #include <stdint.h>
 #include <lttng/ust-events.h>
 #include "lttng/bitfield.h"
index f5f2f67571947b6c89d693ba8b9e28777f63cd89..104ba7601c6bc58598833d4e7acc9374e6262e4f 100644 (file)
@@ -19,7 +19,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#define _GNU_SOURCE
 #include <urcu/compiler.h>
 #include <sched.h>
 
index dead69600f7a06391d9b276e348820eb0a59208a..20d9e2d3cb81e4de7f0904b0992ae84aeb570d85 100644 (file)
@@ -6,6 +6,7 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
+#define _GNU_SOURCE
 #include <urcu/arch.h>
 
 #include <lttng/ringbuffer-config.h>
index cb9446ea45557dbe9b68c53e97344cf304b5c975..ca19648f1d04f544d4f931bb29344fd3e43b65f4 100644 (file)
@@ -38,6 +38,7 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
index 5b2aedba04c726b39766383629a894acf4e26f9b..9bf5da19515247db4b5c67d6a3a30145d1278b1a 100644 (file)
@@ -6,6 +6,7 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "usterr.h"
 #include <pthread.h>
This page took 0.03056 seconds and 4 git commands to generate.