aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos_db.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-10 23:43:04 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-10 23:43:04 +0000
commitbfb288c292363d0bf1ce8fc4ebc105acf023f766 (patch)
tree29bc8d64f37f7562729f1286ddc59c66fae8a16e /apropos_db.c
parentaa959491f9b2b65f9246ea11d9fd9b9ff8cf853b (diff)
downloadmandoc-bfb288c292363d0bf1ce8fc4ebc105acf023f766.tar.gz
mandoc-bfb288c292363d0bf1ce8fc4ebc105acf023f766.tar.zst
mandoc-bfb288c292363d0bf1ce8fc4ebc105acf023f766.zip
On __sun, use <sys/byteorder.h>, BE_64(x), and <db_185.h>.
Thanks to Thomas Klausner <wiz at NetBSD dot org> for providing failing SmartOS build logs such that i could write this patch without access to a __sun system and for confirming that these patches help.
Diffstat (limited to 'apropos_db.c')
-rw-r--r--apropos_db.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/apropos_db.c b/apropos_db.c
index 1ec3c9c2..786fc7bd 100644
--- a/apropos_db.c
+++ b/apropos_db.c
@@ -1,4 +1,4 @@
-/* $Id: apropos_db.c,v 1.32.2.2 2013/10/05 20:30:05 schwarze Exp $ */
+/* $Id: apropos_db.c,v 1.32.2.3 2013/10/10 23:43:04 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -30,14 +30,19 @@
#include <string.h>
#include <unistd.h>
-#if defined(__linux__)
-# include <endian.h>
-# include <db_185.h>
-#elif defined(__APPLE__)
+#if defined(__APPLE__)
# include <libkern/OSByteOrder.h>
-# include <db.h>
+#elif defined(__linux__)
+# include <endian.h>
+#elif defined(__sun)
+# include <sys/byteorder.h>
#else
# include <sys/endian.h>
+#endif
+
+#if defined(__linux__) || defined(__sun)
+# include <db_185.h>
+#else
# include <db.h>
#endif