aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_android.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 2e0df077f85..f86898401c6 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <dlfcn.h>
+#include <fcntl.h>
#include <xf86drm.h>
#if ANDROID_VERSION >= 0x402
@@ -830,7 +831,7 @@ droid_open_device(void)
fd = -1;
}
- return (fd >= 0) ? dup(fd) : -1;
+ return (fd >= 0) ? fcntl(fd, F_DUPFD_CLOEXEC, 3) : -1;
}
/* support versions < JellyBean */