From: Mathieu Desnoyers Date: Tue, 21 Feb 2012 02:58:31 +0000 (-0500) Subject: Use ENOMSG as fallback for ENODATA on freebsd X-Git-Tag: v2.0.0-rc2~66 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e5757a9047b04cb2fb94d9dfdf7153e963eafa95;p=lttng-ust.git Use ENOMSG as fallback for ENODATA on freebsd Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/compat.h b/liblttng-ust/compat.h index 37480671..004e60ac 100644 --- a/liblttng-ust/compat.h +++ b/liblttng-ust/compat.h @@ -55,4 +55,10 @@ void lttng_ust_getprocname(char *name) #endif +#include + +#ifndef ENODATA +#define ENODATA ENOMSG +#endif + #endif /* _UST_COMPAT_H */ diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index ca19648f..56298769 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -53,6 +53,7 @@ #include "backend.h" #include "frontend.h" #include "shm.h" +#include "../liblttng-ust/compat.h" /* For ENODATA */ #ifndef max #define max(a, b) ((a) > (b) ? (a) : (b)) diff --git a/tests/ust-basic-tracing/ust-basic-tracing.c b/tests/ust-basic-tracing/ust-basic-tracing.c index 91a910a6..ae2c8816 100644 --- a/tests/ust-basic-tracing/ust-basic-tracing.c +++ b/tests/ust-basic-tracing/ust-basic-tracing.c @@ -40,6 +40,7 @@ #include #include "../../libringbuffer/backend.h" #include "../../libringbuffer/frontend.h" +#include "../../liblttng-ust/compat.h" /* For ENODATA */ #define MAX_NR_STREAMS 64 #define MAX_NR_EVENTS 128 diff --git a/tests/ust-multi-test/ust-multi-test.c b/tests/ust-multi-test/ust-multi-test.c index 07cd815c..068f59cf 100644 --- a/tests/ust-multi-test/ust-multi-test.c +++ b/tests/ust-multi-test/ust-multi-test.c @@ -40,6 +40,7 @@ #include #include <../../libringbuffer/backend.h> #include <../../libringbuffer/frontend.h> +#include "../../liblttng-ust/compat.h" /* For ENODATA */ #define NR_SESSIONS 4 #define NR_CHANNELS 1