From: Mathieu Desnoyers Date: Wed, 15 Feb 2012 00:12:35 +0000 (-0500) Subject: Define _GNU_SOURCE for all implementation files rather than getcpu.h X-Git-Tag: v1.9.8~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5ad63a1632792c8bc40fa5bc9f7f45f037a68032;p=lttng-ust.git Define _GNU_SOURCE for all implementation files rather than getcpu.h 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 --- diff --git a/liblttng-ust/ltt-ring-buffer-client.h b/liblttng-ust/ltt-ring-buffer-client.h index ce9d263c..7e853992 100644 --- a/liblttng-ust/ltt-ring-buffer-client.h +++ b/liblttng-ust/ltt-ring-buffer-client.h @@ -8,6 +8,7 @@ * Dual LGPL v2.1/GPL v2 license. */ +#define _GNU_SOURCE #include #include #include "lttng/bitfield.h" diff --git a/liblttng-ust/ltt-ring-buffer-metadata-client.h b/liblttng-ust/ltt-ring-buffer-metadata-client.h index 7e79b116..3fa785a2 100644 --- a/liblttng-ust/ltt-ring-buffer-metadata-client.h +++ b/liblttng-ust/ltt-ring-buffer-metadata-client.h @@ -8,6 +8,7 @@ * Dual LGPL v2.1/GPL v2 license. */ +#define _GNU_SOURCE #include #include #include "lttng/bitfield.h" diff --git a/libringbuffer/getcpu.h b/libringbuffer/getcpu.h index f5f2f675..104ba760 100644 --- a/libringbuffer/getcpu.h +++ b/libringbuffer/getcpu.h @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#define _GNU_SOURCE #include #include diff --git a/libringbuffer/ring_buffer_backend.c b/libringbuffer/ring_buffer_backend.c index dead6960..20d9e2d3 100644 --- a/libringbuffer/ring_buffer_backend.c +++ b/libringbuffer/ring_buffer_backend.c @@ -6,6 +6,7 @@ * Dual LGPL v2.1/GPL v2 license. */ +#define _GNU_SOURCE #include #include diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index cb9446ea..ca19648f 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -38,6 +38,7 @@ * Dual LGPL v2.1/GPL v2 license. */ +#define _GNU_SOURCE #include #include #include diff --git a/libringbuffer/smp.c b/libringbuffer/smp.c index 5b2aedba..9bf5da19 100644 --- a/libringbuffer/smp.c +++ b/libringbuffer/smp.c @@ -6,6 +6,7 @@ * Dual LGPL v2.1/GPL v2 license. */ +#define _GNU_SOURCE #include #include "usterr.h" #include