From: Eric Engestrom Date: Fri, 5 Jun 2020 08:22:22 +0000 (+0200) Subject: egl: replace all dup() with os_dupfd_cloexec() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=419b446e1e05bfa5bae310656ee8a89f84489d5e;p=mesa.git egl: replace all dup() with os_dupfd_cloexec() Signed-off-by: Eric Engestrom Reviewed-by: Kristian H. Kristensen Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 2e51d28a8b9..5baa0c9b647 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -62,6 +62,7 @@ #include "egl_dri2.h" #include "GL/mesa_glinterop.h" #include "loader/loader.h" +#include "util/os_file.h" #include "util/u_atomic.h" #include "util/u_vector.h" #include "mapi/glapi/glapi.h" @@ -3456,7 +3457,7 @@ dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync) return EGL_NO_NATIVE_FENCE_FD_ANDROID; } - return dup(sync->SyncFd); + return os_dupfd_cloexec(sync->SyncFd); } static void