diff options
author | Eric Engestrom <[email protected]> | 2020-06-05 01:09:35 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-18 02:09:56 +0000 |
commit | 4a8085d67ca7b41690edf22c410e4dc0a28e3187 (patch) | |
tree | 40904aab7a15a75e3408b1cba8e2a8af8a7fc386 /src/gallium/winsys/nouveau | |
parent | 0e5ea7a36399815a2e39b72f3f0e3a75c44c062d (diff) |
replace all F_DUPFD_CLOEXEC with os_dupfd_cloexec()
All squashed into a single commit because it shouldn't have any
behaviour change, except that it might work now on platforms where it
was broken because F_DUPFD_CLOEXEC is not supported but FD_CLOEXEC is.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
Diffstat (limited to 'src/gallium/winsys/nouveau')
-rw-r--r-- | src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c index d123c8a1c17..3c8345b249f 100644 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c @@ -4,6 +4,7 @@ #include "pipe/p_context.h" #include "pipe/p_state.h" #include "util/format/u_format.h" +#include "util/os_file.h" #include "util/u_memory.h" #include "util/u_inlines.h" #include "util/u_hash_table.h" @@ -71,7 +72,7 @@ nouveau_drm_screen_create(int fd) * nouveau_device_wrap does not close the fd in case of a device * creation error. */ - dupfd = fcntl(fd, F_DUPFD_CLOEXEC, 3); + dupfd = os_dupfd_cloexec(fd); ret = nouveau_drm_new(dupfd, &drm); if (ret) |