Index: gstreamer-vaapi-1.16.0/tests/test-display.c
===================================================================
--- gstreamer-vaapi-1.16.0.orig/tests/test-display.c
+++ gstreamer-vaapi-1.16.0/tests/test-display.c
@@ -51,6 +51,11 @@
 # include <va/va_glx.h>
 #endif
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC     02000000
+#endif
+
+
 static void
 print_value (const GValue * value, const gchar * name)
 {
Index: gstreamer-vaapi-1.16.0/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
===================================================================
--- gstreamer-vaapi-1.16.0.orig/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
+++ gstreamer-vaapi-1.16.0/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
@@ -41,6 +41,10 @@
 #define DEBUG_VAAPI_DISPLAY 1
 #include "gstvaapidebug.h"
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC     02000000
+#endif
+
 G_DEFINE_TYPE_WITH_PRIVATE (GstVaapiDisplayDRM, gst_vaapi_display_drm,
     GST_TYPE_VAAPI_DISPLAY);
 
