diff options
Diffstat (limited to 'libbb/makedev.c')
-rw-r--r-- | libbb/makedev.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libbb/makedev.c b/libbb/makedev.c index cf59e616b..06c4039a3 100644 --- a/libbb/makedev.c +++ b/libbb/makedev.c | |||
@@ -8,16 +8,23 @@ | |||
8 | 8 | ||
9 | /* We do not include libbb.h - #define makedev() is there! */ | 9 | /* We do not include libbb.h - #define makedev() is there! */ |
10 | #include "platform.h" | 10 | #include "platform.h" |
11 | #include <features.h> | 11 | |
12 | #include <sys/sysmacros.h> | 12 | /* Different Unixes want different headers for makedev */ |
13 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \ | ||
14 | || defined(__APPLE__) | ||
15 | # include <sys/types.h> | ||
16 | #else | ||
17 | # include <features.h> | ||
18 | # include <sys/sysmacros.h> | ||
19 | #endif | ||
13 | 20 | ||
14 | #ifdef __GLIBC__ | 21 | #ifdef __GLIBC__ |
15 | /* At least glibc has horrendously large inline for this, so wrap it */ | 22 | /* At least glibc has horrendously large inline for this, so wrap it. */ |
16 | /* uclibc people please check - do we need "&& !__UCLIBC__" above? */ | 23 | /* uclibc people please check - do we need "&& !__UCLIBC__" above? */ |
17 | 24 | ||
18 | /* suppress gcc "no previous prototype" warning */ | 25 | /* Suppress gcc "no previous prototype" warning */ |
19 | unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor); | 26 | unsigned long long FAST_FUNC bb_makedev(unsigned major, unsigned minor); |
20 | unsigned long long FAST_FUNC bb_makedev(unsigned int major, unsigned int minor) | 27 | unsigned long long FAST_FUNC bb_makedev(unsigned major, unsigned minor) |
21 | { | 28 | { |
22 | return makedev(major, minor); | 29 | return makedev(major, minor); |
23 | } | 30 | } |