summaryrefslogtreecommitdiff
path: root/util/kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'util/kconfig')
-rw-r--r--util/kconfig/symbol.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/kconfig/symbol.c b/util/kconfig/symbol.c
index 65ba46543f..af494391bb 100644
--- a/util/kconfig/symbol.c
+++ b/util/kconfig/symbol.c
@@ -7,7 +7,9 @@
#include <stdlib.h>
#include <string.h>
#include <regex.h>
+#ifndef __MINGW32__
#include <sys/utsname.h>
+#endif
#include "lkc.h"
@@ -45,19 +47,27 @@ static void sym_add_default(struct symbol *sym, const char *def)
void sym_init(void)
{
struct symbol *sym;
+#ifndef __MINGW32__
struct utsname uts;
+#endif
static bool inited = false;
if (inited)
return;
inited = true;
+#ifndef __MINGW32__
uname(&uts);
+#endif
sym = sym_lookup("UNAME_RELEASE", 0);
sym->type = S_STRING;
sym->flags |= SYMBOL_AUTO;
+#ifndef __MINGW32__
sym_add_default(sym, uts.release);
+#else
+ sym_add_default(sym, "mingw-unknown");
+#endif
}
enum symbol_type sym_get_type(struct symbol *sym)