port: fix endian and byteswap compat on FreeBSD
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 13 Oct 2020 20:42:23 +0000 (16:42 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 14 Oct 2020 18:10:02 +0000 (14:10 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8edd89df2c99406b10b846eb1a8bcf959e8bbde4

include/lttng/ust-elf.h
include/lttng/ust-endian.h
include/lttng/ust-tracepoint-event.h
liblttng-ust-ctl/ustctl.c
liblttng-ust/lttng-filter-interpreter.c

index c4abee2dbf1158717cbb0fd0e91485a155965bcf..49edc6f9982667a89534e68c20acd261d7e72183 100644 (file)
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <byteswap.h>
 #include <elf.h>
 #include <lttng/ust-endian.h>
 
index a512b02bf3719fc89f2126df72e5f46a5d93a194..763a447e6fcb16bfaa8f882f20caff5d24e66eb0 100644 (file)
 
 #if (defined(__linux__) || defined(__CYGWIN__))
 #include <endian.h>
+#include <byteswap.h>
 #elif defined(__FreeBSD__)
-#include <machine/endian.h>
+#include <sys/endian.h>
+#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
index ec0e314432e58cde1be7deae76601dec5f2ca1e4..622befe0be71183a86ce2502cd1b6670fde4f1f0 100644 (file)
@@ -29,7 +29,7 @@
 #include <lttng/ringbuffer-config.h>
 #include <lttng/ust-compiler.h>
 #include <lttng/tracepoint.h>
-#include <byteswap.h>
+#include <lttng/ust-endian.h>
 #include <string.h>
 
 #define __LTTNG_UST_NULL_STRING        "(null)"
index 69bbd21a0959c93bbd870166ca1b56b8cc34533f..a7eca3b0b611d7d47513ab4c968b4a75666071a2 100644 (file)
@@ -17,7 +17,6 @@
  */
 
 #define _GNU_SOURCE
-#include <byteswap.h>
 #include <stdint.h>
 #include <string.h>
 #include <sys/mman.h>
@@ -27,6 +26,7 @@
 #include <lttng/ust-ctl.h>
 #include <lttng/ust-abi.h>
 #include <lttng/ust-events.h>
+#include <lttng/ust-endian.h>
 #include <usterr-signal-safe.h>
 #include <ust-comm.h>
 #include <helper.h>
index 5255bb73238ea7bb6def6dfd136229028ab326e0..6c42b20f1c790838f69fb6c6e1605a8419283f3a 100644 (file)
@@ -28,7 +28,7 @@
 #include <stddef.h>
 #include <stdint.h>
 #include <urcu-pointer.h>
-#include <byteswap.h>
+#include <lttng/ust-endian.h>
 #include "lttng-filter.h"
 #include "string-utils.h"
 
This page took 0.028091 seconds and 4 git commands to generate.