summaryrefslogtreecommitdiff
path: root/payloads/libpayload/util/kconfig/symbol.c
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2010-04-20 16:00:07 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-04-20 16:00:07 +0000
commit01c2f5b0f20331bcfb16df2b7e1f3122a57795c2 (patch)
tree3ada8023901f77ce8e3206748bd31d7265d80095 /payloads/libpayload/util/kconfig/symbol.c
parent682ea3cc2132639311d772ad9bcb00748e59a257 (diff)
downloadcoreboot-01c2f5b0f20331bcfb16df2b7e1f3122a57795c2.tar.xz
Copy mingw support for kconfig from coreboot to libpayload
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5463 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/util/kconfig/symbol.c')
-rw-r--r--payloads/libpayload/util/kconfig/symbol.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/util/kconfig/symbol.c b/payloads/libpayload/util/kconfig/symbol.c
index 4a03191ad1..2ea30089ca 100644
--- a/payloads/libpayload/util/kconfig/symbol.c
+++ b/payloads/libpayload/util/kconfig/symbol.c
@@ -7,7 +7,9 @@
#include <stdlib.h>
#include <string.h>
#include <regex.h>
+#ifndef WIN32
#include <sys/utsname.h>
+#endif
#define LKC_DIRECT_LINK
#include "lkc.h"
@@ -46,19 +48,27 @@ void sym_add_default(struct symbol *sym, const char *def)
void sym_init(void)
{
struct symbol *sym;
+#ifndef WIN32
struct utsname uts;
+#endif
static bool inited = false;
if (inited)
return;
inited = true;
+#ifndef WIN32
uname(&uts);
+#endif
sym = sym_lookup("UNAME_RELEASE", 0);
sym->type = S_STRING;
sym->flags |= SYMBOL_AUTO;
+#ifndef WIN32
sym_add_default(sym, uts.release);
+#else
+ sym_add_default(sym, "");
+#endif
}
enum symbol_type sym_get_type(struct symbol *sym)