aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/vc4/drm/vc4_drm_winsys.c')
-rw-r--r--src/gallium/winsys/vc4/drm/vc4_drm_winsys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c b/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
index 2d05ac8cc92..a507821a940 100644
--- a/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
+++ b/src/gallium/winsys/vc4/drm/vc4_drm_winsys.c
@@ -25,6 +25,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
+#include "util/os_file.h"
+
#include "renderonly/renderonly.h"
#include "kmsro/drm/kmsro_drm_public.h"
#include "vc4_drm_public.h"
@@ -46,7 +48,7 @@ vc4_drm_screen_create(int fd, const struct pipe_screen_config *config)
#endif
if (v3d_present)
- return vc4_screen_create(fcntl(fd, F_DUPFD_CLOEXEC, 3), NULL);
+ return vc4_screen_create(os_dupfd_cloexec(fd), NULL);
#ifdef GALLIUM_KMSRO
return kmsro_drm_screen_create(fd, config);