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.1.0-rc1~97^2~28 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=bdcf8d826c422e00a533d99bee937ddd0f877842 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 967a1200..a7fa84da 100644 --- a/tests/ust-basic-tracing/ust-basic-tracing.c +++ b/tests/ust-basic-tracing/ust-basic-tracing.c @@ -42,6 +42,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 5975789f..814e4517 100644 --- a/tests/ust-multi-test/ust-multi-test.c +++ b/tests/ust-multi-test/ust-multi-test.c @@ -42,6 +42,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