Index: libdrm-2.4.52/intel/intel_bufmgr_gem.c =================================================================== --- libdrm-2.4.52.orig/intel/intel_bufmgr_gem.c +++ libdrm-2.4.52/intel/intel_bufmgr_gem.c @@ -38,6 +38,9 @@ #include "config.h" #endif +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif #include #include #include Index: libdrm-2.4.52/nouveau/nouveau.c =================================================================== --- libdrm-2.4.52.orig/nouveau/nouveau.c +++ libdrm-2.4.52/nouveau/nouveau.c @@ -26,6 +26,9 @@ #include #endif +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif #include #include #include Index: libdrm-2.4.52/radeon/radeon_bo_gem.c =================================================================== --- libdrm-2.4.52.orig/radeon/radeon_bo_gem.c +++ libdrm-2.4.52/radeon/radeon_bo_gem.c @@ -32,6 +32,9 @@ #ifdef HAVE_CONFIG_H #include #endif +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif #include #include #include