summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/xa/xa_tracker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c
index d98bd2dc922..03a3abf6835 100644
--- a/src/gallium/state_trackers/xa/xa_tracker.c
+++ b/src/gallium/state_trackers/xa/xa_tracker.c
@@ -27,6 +27,7 @@
*/
#include <unistd.h>
+#include <fcntl.h>
#include "xa_tracker.h"
#include "xa_priv.h"
#include "pipe/p_state.h"
@@ -157,7 +158,7 @@ xa_tracker_create(int drm_fd)
if (!xa)
return NULL;
- if (drm_fd < 0 || (fd = dup(drm_fd)) < 0)
+ if (drm_fd < 0 || (fd = fcntl(drm_fd, F_DUPFD_CLOEXEC, 3)) < 0)
goto out_no_fd;
if (pipe_loader_drm_probe_fd(&xa->dev, fd))