From: Eric Engestrom Date: Fri, 5 Jun 2020 08:55:35 +0000 (+0200) Subject: svga: replace all dup() with os_dupfd_cloexec() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=526910e8faa95f844a60af743beb904f666972e1;p=mesa.git svga: 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/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index 38ef3bcb9fe..334adde7b31 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -37,6 +37,7 @@ #include "svga_cmd.h" #include "svga3d_caps.h" +#include "util/os_file.h" #include "util/u_inlines.h" #include "util/u_math.h" #include "util/u_memory.h" @@ -143,7 +144,7 @@ vmw_svga_winsys_fence_get_fd(struct svga_winsys_screen *sws, boolean duplicate) { if (duplicate) - return dup(vmw_fence_get_fd(fence)); + return os_dupfd_cloexec(vmw_fence_get_fd(fence)); else return vmw_fence_get_fd(fence); } @@ -154,7 +155,7 @@ vmw_svga_winsys_fence_create_fd(struct svga_winsys_screen *sws, struct pipe_fence_handle **fence, int32_t fd) { - *fence = vmw_fence_create(NULL, 0, 0, 0, dup(fd)); + *fence = vmw_fence_create(NULL, 0, 0, 0, os_dupfd_cloexec(fd)); } static int