diff options
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r-- | src/egl/main/egldisplay.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 7aaab3c2c94..690728d2f70 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -49,10 +49,6 @@ #include "eglsync.h" /* Includes for _eglNativePlatformDetectNativeDisplay */ -#ifdef HAVE_MINCORE -#include <unistd.h> -#include <sys/mman.h> -#endif #ifdef HAVE_WAYLAND_PLATFORM #include <wayland-client.h> #endif @@ -106,35 +102,6 @@ _eglGetNativePlatformFromEnv(void) /** - * Perform validity checks on a generic pointer. - */ -static EGLBoolean -_eglPointerIsDereferencable(void *p) -{ -#ifdef HAVE_MINCORE - uintptr_t addr = (uintptr_t) p; - unsigned char valid = 0; - const long page_size = getpagesize(); - - if (p == NULL) - return EGL_FALSE; - - /* align addr to page_size */ - addr &= ~(page_size - 1); - - if (mincore((void *) addr, page_size, &valid) < 0) { - _eglLog(_EGL_DEBUG, "mincore failed: %m"); - return EGL_FALSE; - } - - return (valid & 0x01) == 0x01; -#else - return p != NULL; -#endif -} - - -/** * Try detecting native platform with the help of native display characteristcs. */ static _EGLPlatformType |