util/u_process: fix Windows build
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 24 Mar 2020 15:12:26 +0000 (16:12 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 24 Mar 2020 15:58:34 +0000 (15:58 +0000)
Reported by Brian Paul.

Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path")
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4303>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4303>

src/util/u_process.c

index 686e46244291f930788a081bbb422d2971530cef..0454760f471cc828ecf901f59ec76dfef0c7b8f0 100644 (file)
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
-#include <unistd.h>
 
 #undef GET_PROGRAM_NAME
 
 #if DETECT_OS_WINDOWS
 #include <windows.h>
+#else
+#include <unistd.h>
 #endif
 
 #if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME)