summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/tegra
diff options
context:
space:
mode:
authorEric Engestrom <eric@engestrom.ch>2020-06-05 01:09:35 +0200
committerMarge Bot <eric+marge@anholt.net>2020-06-18 02:09:56 +0000
commit4a8085d67ca7b41690edf22c410e4dc0a28e3187 (patch)
tree40904aab7a15a75e3408b1cba8e2a8af8a7fc386 /src/gallium/winsys/tegra
parent0e5ea7a36399815a2e39b72f3f0e3a75c44c062d (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 <eric@engestrom.ch> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
Diffstat (limited to 'src/gallium/winsys/tegra')
-rw-r--r--src/gallium/winsys/tegra/drm/tegra_drm_winsys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/winsys/tegra/drm/tegra_drm_winsys.c b/src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
index e2a8efb0f63..9f1732a5497 100644
--- a/src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
+++ b/src/gallium/winsys/tegra/drm/tegra_drm_winsys.c
@@ -23,6 +23,7 @@
#include <fcntl.h>
+#include "util/os_file.h"
#include "util/u_debug.h"
#include "tegra/tegra_screen.h"
@@ -37,7 +38,7 @@ struct pipe_screen *tegra_drm_screen_create(int fd)
* NOTE: There are reportedly issues with reusing the file descriptor
* as-is related to Xinerama. Duplicate it to side-step any issues.
*/
- fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
+ fd = os_dupfd_cloexec(fd);
if (fd < 0)
return NULL;