diff --git a/src/util/anon_file.c b/src/util/anon_file.c index 983ff75ac02..dacc8e737af 100644 --- a/src/util/anon_file.c +++ b/src/util/anon_file.c @@ -28,6 +28,7 @@ */ #include "anon_file.h" +#include "detect_os.h" #ifndef _WIN32 @@ -38,7 +39,7 @@ #if defined(HAVE_MEMFD_CREATE) || defined(__FreeBSD__) || defined(__OpenBSD__) #include -#elif defined(ANDROID) +#elif DETECT_OS_ANDROID #include #include #else @@ -120,7 +121,7 @@ os_create_anonymous_file(int64_t size, const char *debug_name) if (!debug_name) debug_name = "mesa-shared"; fd = memfd_create(debug_name, MFD_CLOEXEC | MFD_ALLOW_SEALING); -#elif defined(ANDROID) +#elif DETECT_OS_ANDROID if (!debug_name) debug_name = "mesa-shared"; fd = syscall(SYS_memfd_create, debug_name, MFD_CLOEXEC | MFD_ALLOW_SEALING);