diff options
Diffstat (limited to 'libbb/mode_string.c')
-rw-r--r-- | libbb/mode_string.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/mode_string.c b/libbb/mode_string.c index d3ff18375..7afcaa61b 100644 --- a/libbb/mode_string.c +++ b/libbb/mode_string.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | 14 | ||
15 | #include <assert.h> | 15 | #include <assert.h> |
16 | #ifndef __MINGW32__ | ||
16 | #include <sys/stat.h> | 17 | #include <sys/stat.h> |
17 | 18 | ||
18 | #include "libbb.h" | 19 | #include "libbb.h" |
@@ -29,6 +30,7 @@ | |||
29 | || ( S_IFDIR != 0040000 ) || ( S_IFCHR != 0020000 ) \ | 30 | || ( S_IFDIR != 0040000 ) || ( S_IFCHR != 0020000 ) \ |
30 | || ( S_IFIFO != 0010000 ) | 31 | || ( S_IFIFO != 0010000 ) |
31 | #warning mode type bitflag value assumption(s) violated! falling back to larger version | 32 | #warning mode type bitflag value assumption(s) violated! falling back to larger version |
33 | #endif | ||
32 | 34 | ||
33 | #if (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX) == 07777 | 35 | #if (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX) == 07777 |
34 | #undef mode_t | 36 | #undef mode_t |
@@ -91,6 +93,7 @@ static const char type_chars[16] = "?pc?d?b?-?l?s???"; | |||
91 | /* 0123456789abcdef */ | 93 | /* 0123456789abcdef */ |
92 | static const char mode_chars[7] = "rwxSTst"; | 94 | static const char mode_chars[7] = "rwxSTst"; |
93 | 95 | ||
96 | #define mode_t unsigned short | ||
94 | const char *bb_mode_string(mode_t mode) | 97 | const char *bb_mode_string(mode_t mode) |
95 | { | 98 | { |
96 | static char buf[12]; | 99 | static char buf[12]; |