ports/sysutils/lttng-ust/files/patch-include_lttng_ust-elf.h
Mahdi Mokhtari a8416c340c Adding sysutils/lttng-ust and sysutils/lttng-tools.
LTTng stands for Linux Trace Toolkit: next generation. It's a modern toolkit
for tracing Linux (And now FreeBSD, only userspace now) programs.

PR:		216142
Submitted by:	mmokhi
Reported by:	mmokhi
Reviewed by:	feld, mat
Approved by:	feld, mat (mentors)
Differential Revision:	https://reviews.freebsd.org/D9200
2017-02-11 15:36:17 +00:00

22 lines
519 B
C

--- include/lttng/ust-elf.h.orig 2016-10-18 22:44:06 UTC
+++ include/lttng/ust-elf.h
@@ -21,7 +21,19 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/endian.h>
+#define bswap_16 bswap16
+#define bswap_32 bswap32
+#define bswap_64 bswap64
+#define __bswap_16 bswap16
+#define __bswap_32 bswap32
+#define __bswap_64 bswap64
+#define NT_GNU_BUILD_ID 3
+#else
#include <byteswap.h>
+#endif
#include <elf.h>
#include <lttng/ust-endian.h>