#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
-#include <byteswap.h>
#include <elf.h>
#include <lttng/ust-endian.h>
#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
#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)"
*/
#define _GNU_SOURCE
-#include <byteswap.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#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>
#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"