aboutsummaryrefslogtreecommitdiff
path: root/libbb/makedev.c
diff options
context:
space:
mode:
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 */