replace all F_DUPFD_CLOEXEC with os_dupfd_cloexec()
[mesa.git] / src / gallium / winsys / tegra / drm / tegra_drm_winsys.c
index e2a8efb0f63ff2f20b7df89e6176dd1f49e41df0..9f1732a549762942f73ac671dd495514e002502a 100644 (file)
@@ -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;