summaryrefslogtreecommitdiffhomepage
path: root/libbb/makedev.c
diff options
context:
space:
mode:
authorChris Rees <utisoft@gmail.com>2011-01-24 17:07:40 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-01-24 17:07:40 +0100
commite22af94afb904b8f727b4eaff329e15783ec1cc7 (patch)
tree13623f796a6897206da6355c13a0fb41724c55e1 /libbb/makedev.c
parent330718ef5574d1f830e304107d2a43038aa6ff5c (diff)
FreeBSD compat for makedev
Signed-off-by: Chris Rees <utisoft@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/makedev.c')
-rw-r--r--libbb/makedev.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbb/makedev.c b/libbb/makedev.c
index cf59e616b..1809fda4e 100644
--- a/libbb/makedev.c
+++ b/libbb/makedev.c
@@ -8,8 +8,14 @@
/* We do not include libbb.h - #define makedev() is there! */
#include "platform.h"
-#include <features.h>
-#include <sys/sysmacros.h>
+#if !(defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
+ || defined(__APPLE__) \
+ )
+# include <features.h>
+# include <sys/sysmacros.h>
+#else
+# include <sys/types.h>
+#endif
#ifdef __GLIBC__
/* At least glibc has horrendously large inline for this, so wrap it */