From: Eric Engestrom Date: Fri, 5 Jun 2020 10:39:28 +0000 (+0200) Subject: util/os_file: replace broken windows-detection code with detect_os.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b00e1d9ea77a409cc15e57568284d48bdb9443c2;p=mesa.git util/os_file: replace broken windows-detection code with detect_os.h The meson-windows-vs2019 job was going down the `!defined(WIN32)` path, leading to a broken build once that path contained non-windows code. Signed-off-by: Eric Engestrom Reviewed-by: Kristian H. Kristensen Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/util/os_file.c b/src/util/os_file.c index 5771b27e5d0..f02d74afd2c 100644 --- a/src/util/os_file.c +++ b/src/util/os_file.c @@ -4,14 +4,14 @@ */ #include "os_file.h" +#include "detect_os.h" #include #include #include #include - -#if defined(WIN32) +#if DETECT_OS_WINDOWS #include #define open _open #define fdopen _fdopen @@ -31,7 +31,7 @@ os_file_create_unique(const char *filename, int filemode) } -#if defined(__linux__) +#if DETECT_OS_LINUX #include #include