summaryrefslogtreecommitdiff
path: root/cgpt/cgpt_endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'cgpt/cgpt_endian.h')
-rw-r--r--cgpt/cgpt_endian.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgpt/cgpt_endian.h b/cgpt/cgpt_endian.h
index a40b2c18..f59ab1b2 100644
--- a/cgpt/cgpt_endian.h
+++ b/cgpt/cgpt_endian.h
@@ -7,8 +7,10 @@
#define VBOOT_REFERENCE_CGPT_ENDIAN_H_
// Newer distros already have this. For those that don't, we add it here.
-#ifndef HAVE_MACOS
+#if !defined(HAVE_MACOS) && !defined(__FreeBSD__)
#include <endian.h>
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
#endif
#ifndef le16toh