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 <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
This commit is contained in:
Eric Engestrom
2020-06-05 12:39:28 +02:00
committed by Marge Bot
parent bf63da3e95
commit b00e1d9ea7
+3 -3
View File
@@ -4,14 +4,14 @@
*/
#include "os_file.h"
#include "detect_os.h"
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#if defined(WIN32)
#if DETECT_OS_WINDOWS
#include <io.h>
#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 <fcntl.h>
#include <sys/stat.h>