From: Michael Jeanson Date: Tue, 13 Oct 2020 20:42:23 +0000 (-0400) Subject: port: fix endian and byteswap compat on FreeBSD X-Git-Tag: v2.13.0-rc1~484 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3208818bfe394315cae502a14e01195713299aac;p=lttng-ust.git port: fix endian and byteswap compat on FreeBSD Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I8edd89df2c99406b10b846eb1a8bcf959e8bbde4 --- diff --git a/include/lttng/ust-elf.h b/include/lttng/ust-elf.h index c4abee2d..49edc6f9 100644 --- a/include/lttng/ust-elf.h +++ b/include/lttng/ust-elf.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/include/lttng/ust-endian.h b/include/lttng/ust-endian.h index a512b02b..763a447e 100644 --- a/include/lttng/ust-endian.h +++ b/include/lttng/ust-endian.h @@ -29,8 +29,12 @@ #if (defined(__linux__) || defined(__CYGWIN__)) #include +#include #elif defined(__FreeBSD__) -#include +#include +#define bswap_16(x) bswap16(x) +#define bswap_32(x) bswap32(x) +#define bswap_64(x) bswap64(x) #else #error "Please add support for your OS." #endif diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index ec0e3144..622befe0 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #define __LTTNG_UST_NULL_STRING "(null)" diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 69bbd21a..a7eca3b0 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -17,7 +17,6 @@ */ #define _GNU_SOURCE -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/liblttng-ust/lttng-filter-interpreter.c b/liblttng-ust/lttng-filter-interpreter.c index 5255bb73..6c42b20f 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "lttng-filter.h" #include "string-utils.h"