diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 3ee3f1b598c..b96a152d3be 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -93,6 +93,7 @@ #include #include "c11/threads.h" #include "mapi/glapi/glapi.h" +#include "util/detect_os.h" #include "util/macros.h" #include "util/perf/cpu_trace.h" #include "util/u_debug.h" @@ -652,7 +653,7 @@ _eglComputeVersion(_EGLDisplay *disp) disp->Version = 15; /* For Android P and below limit the EGL version to 1.4 */ -#if defined(ANDROID) && ANDROID_API_LEVEL <= 28 +#if DETECT_OS_ANDROID && ANDROID_API_LEVEL <= 28 disp->Version = 14; #endif } diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h index 270c7dde7a1..e0f6f7b6b12 100644 --- a/src/egl/main/eglcurrent.h +++ b/src/egl/main/eglcurrent.h @@ -30,6 +30,8 @@ #include +#include "util/detect_os.h" + #include "egltypedefs.h" #ifdef __cplusplus @@ -64,7 +66,7 @@ struct _egl_thread_info { static inline EGLBoolean _eglIsApiValid(EGLenum api) { -#if HAVE_OPENGL && !defined(ANDROID) +#if HAVE_OPENGL && !DETECT_OS_ANDROID /* OpenGL is not a valid/supported API on Android */ if (api == EGL_OPENGL_API) return true;