Index: gstreamer-vaapi-1.10.4/tests/test-display.c
===================================================================
--- gstreamer-vaapi-1.10.4.orig/tests/test-display.c
+++ gstreamer-vaapi-1.10.4/tests/test-display.c
@@ -53,6 +53,11 @@
 /* Set to 1 to check display cache works (shared VA display) */
 #define CHECK_DISPLAY_CACHE 1
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC     02000000
+#endif
+
+
 static void
 print_value (const GValue * value, const gchar * name)
 {
Index: gstreamer-vaapi-1.10.4/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
===================================================================
--- gstreamer-vaapi-1.10.4.orig/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
+++ gstreamer-vaapi-1.10.4/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
@@ -41,6 +41,10 @@
 #define DEBUG 1
 #include "gstvaapidebug.h"
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC     02000000
+#endif
+
 static const guint g_display_types = 1U << GST_VAAPI_DISPLAY_TYPE_DRM;
 
 typedef enum
