incorporate header fixes proposed in bug 3097
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 7 Feb 2011 13:58:57 +0000 (14:58 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 7 Feb 2011 13:58:57 +0000 (14:58 +0100)
Not sure these are *really* needed, but I suppose they don't hurt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
include/platform.h

index 6358e654ab0b6fd295d5f6f743f5c8a80868184e..dd82e975453835df37aa3da84b2b72745a2b189f 100644 (file)
@@ -33,6 +33,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#ifndef major
+# include <sys/sysmacros.h>
+#endif
 #include <sys/wait.h>
 #include <termios.h>
 #include <time.h>
index 9d6e216264f98e8ccff837a5adaa179923444041..f0b8ec10ac6d128891df0b2eec2f1d29ed358610 100644 (file)
@@ -362,7 +362,7 @@ typedef unsigned smalluint;
 
 #endif
 
-#if defined(__GLIBC__)
+#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L) || defined(__GLIBC__)
 # define fdprintf dprintf
 #endif