diff options
-rw-r--r-- | src/commonlib/bsd/include/commonlib/bsd/sysincludes.h | 6 | ||||
-rw-r--r-- | src/commonlib/bsd/lz4_wrapper.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/commonlib/bsd/include/commonlib/bsd/sysincludes.h b/src/commonlib/bsd/include/commonlib/bsd/sysincludes.h new file mode 100644 index 0000000000..3a87cda1c4 --- /dev/null +++ b/src/commonlib/bsd/include/commonlib/bsd/sysincludes.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only */ +#if defined(__FreeBSD__) +#include <sys/endian.h> +#else +#include <endian.h> +#endif diff --git a/src/commonlib/bsd/lz4_wrapper.c b/src/commonlib/bsd/lz4_wrapper.c index 3822e8c60f..73185a5051 100644 --- a/src/commonlib/bsd/lz4_wrapper.c +++ b/src/commonlib/bsd/lz4_wrapper.c @@ -2,7 +2,7 @@ #include <commonlib/bsd/compression.h> #include <commonlib/bsd/helpers.h> -#include <endian.h> +#include <commonlib/bsd/sysincludes.h> #include <stdint.h> #include <string.h> |