os: add missing include for bswap_* on BSDs
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 9 Jul 2017 07:09:35 +0000 (08:09 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Thu, 27 Jul 2017 05:15:00 +0000 (06:15 +0100)
Commit 0dcebdf4a70ef0d8144b8fcba763ae87e7fc74b5 ("configure: add endian
check") removed the sys/endian.h include from the os/*.h BSD headers but
this include is needed to access the bswap_* macros. The lack of this
include wouldn't show up unless you were compiling for a big-endian BSD
platform.

This commit adds the include back for {Free,Net,Open}BSD and adds it for
the first time to the DragonFlyBSD header.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
os/os-dragonfly.h
os/os-freebsd.h
os/os-netbsd.h
os/os-openbsd.h

index 8a116e60b5deefa43e189496fb5accdb9d4d69df..8d15833562785ba4db31f1d31bd0e45c30587550 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <errno.h>
 #include <unistd.h>
+#include <sys/endian.h>
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #include <sys/statvfs.h>
index c7863b5e02eb5b978f266cc5d9329827c1819aca..e6da286ea264f92fa2ed4e08d283c3bf0e4350c5 100644 (file)
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <sys/sysctl.h>
 #include <sys/disk.h>
+#include <sys/endian.h>
 #include <sys/thr.h>
 #include <sys/socket.h>
 #include <sys/param.h>
index 7be02a789e632404a0092248667a27351844b049..eac76cf26bb2ea9247ecaf394468b4987e831585 100644 (file)
@@ -10,6 +10,7 @@
 #include <sys/ioctl.h>
 #include <sys/dkio.h>
 #include <sys/disklabel.h>
+#include <sys/endian.h>
 /* XXX hack to avoid confilcts between rbtree.h and <sys/rb.h> */
 #define        rb_node _rb_node
 #include <sys/sysctl.h>
index d874ee2539e7d574f4898338c4d8f823c942cc93..675bf892d78ab556d178c8dff51e482e8b4267ed 100644 (file)
@@ -9,6 +9,7 @@
 #include <sys/ioctl.h>
 #include <sys/dkio.h>
 #include <sys/disklabel.h>
+#include <sys/endian.h>
 #include <sys/utsname.h>
 /* XXX hack to avoid conflicts between rbtree.h and <sys/tree.h> */
 #include <sys/sysctl.h>