diff options
Diffstat (limited to 'coreutils/uname.c')
-rw-r--r-- | coreutils/uname.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/coreutils/uname.c b/coreutils/uname.c index 1c6aa5f79..56d985eb0 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -70,11 +70,17 @@ | |||
70 | /* After libbb.h, since it needs sys/types.h on some systems */ | 70 | /* After libbb.h, since it needs sys/types.h on some systems */ |
71 | #include <sys/utsname.h> | 71 | #include <sys/utsname.h> |
72 | 72 | ||
73 | #if ENABLE_PLATFORM_MINGW32 | ||
74 | # define OSNAME "MS/Windows" | ||
75 | #else | ||
76 | # define OSNAME "GNU/Linux" | ||
77 | #endif | ||
78 | |||
73 | typedef struct { | 79 | typedef struct { |
74 | struct utsname name; | 80 | struct utsname name; |
75 | char processor[sizeof(((struct utsname*)NULL)->machine)]; | 81 | char processor[sizeof(((struct utsname*)NULL)->machine)]; |
76 | char platform[sizeof(((struct utsname*)NULL)->machine)]; | 82 | char platform[sizeof(((struct utsname*)NULL)->machine)]; |
77 | char os[sizeof("GNU/Linux")]; | 83 | char os[sizeof(OSNAME)]; |
78 | } uname_info_t; | 84 | } uname_info_t; |
79 | 85 | ||
80 | static const char options[] ALIGN1 = "snrvmpioa"; | 86 | static const char options[] ALIGN1 = "snrvmpioa"; |
@@ -141,7 +147,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv) | |||
141 | #endif | 147 | #endif |
142 | strcpy(uname_info.processor, unknown_str); | 148 | strcpy(uname_info.processor, unknown_str); |
143 | strcpy(uname_info.platform, unknown_str); | 149 | strcpy(uname_info.platform, unknown_str); |
144 | strcpy(uname_info.os, "GNU/Linux"); | 150 | strcpy(uname_info.os, OSNAME); |
145 | #if 0 | 151 | #if 0 |
146 | /* Fedora does something like this */ | 152 | /* Fedora does something like this */ |
147 | strcpy(uname_info.processor, uname_info.name.machine); | 153 | strcpy(uname_info.processor, uname_info.name.machine); |