summaryrefslogtreecommitdiffstats
path: root/dba_write.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-05 23:15:08 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-05 23:15:08 +0000
commit1bb4f8bb9e7406c14961365a652ce2e16ab7664c (patch)
tree2a8129ceef5cd8f7b879e2e237d86550acfc26da /dba_write.c
parent1f861fd3370a3a1e8fe52966b1dc54ac8e106cd9 (diff)
downloadmandoc-1bb4f8bb9e7406c14961365a652ce2e16ab7664c.tar.gz
The concept of endianness seems to be somewhat newfangled, so the
respective conversion functions are not yet properly standardized. Rumour has it that POSIX is working on it, though. For now, sprinkle some configuration glue.
Diffstat (limited to 'dba_write.c')
-rw-r--r--dba_write.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dba_write.c b/dba_write.c
index 8b911f90..80574518 100644
--- a/dba_write.c
+++ b/dba_write.c
@@ -20,7 +20,13 @@
#include "config.h"
#include <assert.h>
+#if HAVE_ENDIAN
#include <endian.h>
+#elif HAVE_SYS_ENDIAN
+#include <sys/endian.h>
+#elif HAVE_NTOHL
+#include <arpa/inet.h>
+#endif
#if HAVE_ERR
#include <err.h>
#endif