FreeBSD compat for makedev
authorChris Rees <utisoft@gmail.com>
Mon, 24 Jan 2011 16:07:40 +0000 (17:07 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jan 2011 16:07:40 +0000 (17:07 +0100)
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/makedev.c

index cf59e616b8d286676af648095e7716be0a39009b..1809fda4e29e9aa7e0df1d2208c90e26de065635 100644 (file)
@@ -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 */