#include <fcntl.h>
+#include "util/os_file.h"
#include "util/u_debug.h"
#include "tegra/tegra_screen.h"
* 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;