diff --git a/tools/Config.mk b/tools/Config.mk index e05c85fa813..2466f1fbde8 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -62,7 +62,7 @@ endif # Define HOSTCC on the make command line if it differs from these defaults # Define HOSTCFLAGS with -g on the make command line to build debug versions -ifeq ($(CONFIG_WINDOWS_MSYS),y) +ifeq ($(CONFIG_WINDOWS_NATIVE),y) # In the Windows native environment, the MinGW GCC compiler is used diff --git a/tools/incdir.c b/tools/incdir.c index 585aa25599b..b02269396f5 100644 --- a/tools/incdir.c +++ b/tools/incdir.c @@ -21,8 +21,10 @@ /**************************************************************************** * Included Files ****************************************************************************/ - +#ifndef CONFIG_WINDOWS_NATIVE #include +#endif + #include #include #include @@ -115,16 +117,17 @@ static void show_help(const char *progname, int exitcode) static enum os_e get_os(char *ccname) { - struct utsname buf; - int ret; - +#ifdef CONFIG_WINDOWS_NATIVE /* Check for MinGW which implies a Windows native environment */ if (strstr(ccname, "mingw") != NULL) { return OS_WINDOWS; } - +#else + struct utsname buf; + int ret; + /* Get the context names */ ret = uname(&buf); @@ -165,8 +168,9 @@ static enum os_e get_os(char *ccname) { fprintf(stderr, "ERROR: Unknown operating system: %s\n", buf.sysname); - return OS_UNKNOWN; } +#endif + return OS_UNKNOWN; } static enum compiler_e get_compiler(char *ccname, enum os_e os)