Fix build on systems without O_CLOEXEC.

This commit is contained in:
wiz 2012-08-13 09:05:07 +00:00
parent d4b8840571
commit 123a7e6d6c
2 changed files with 20 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.22 2012/08/13 07:02:00 wiz Exp $
$NetBSD: distinfo,v 1.23 2012/08/13 09:05:07 wiz Exp $
SHA1 (libdrm-2.4.38.tar.bz2) = e90e28a0db2c32238e445f48af9683600c5f191f
RMD160 (libdrm-2.4.38.tar.bz2) = 59667c2d37c2e57155b2c0095881171b7098d82b
@ -6,5 +6,6 @@ Size (libdrm-2.4.38.tar.bz2) = 484514 bytes
SHA1 (patch-ab) = 66dadd3244bfa9c69be0982fd2108deb94483de2
SHA1 (patch-ac) = 67c998df7dfc0dabc86320ea6d015cede3e464ea
SHA1 (patch-ad) = ea3ef8de8db782ddab23f182f1e6bd9d8f612a78
SHA1 (patch-include_drm_drm.h) = d370e83da5c39f0e49094787c5f4580758c911b0
SHA1 (patch-intel_intel__bufmgr__gem.c) = 418d00f24344b7abaa86d3b3d10817314ce70175
SHA1 (patch-libkms_linux.c) = 737d0a8e7b742ee9d24fec94c72de6b4915dd675

View file

@ -0,0 +1,18 @@
$NetBSD: patch-include_drm_drm.h,v 1.1 2012/08/13 09:05:07 wiz Exp $
Fix compilation on systems that don't provide O_CLOEXEC.
--- include/drm/drm.h.orig 2012-08-11 18:49:45.000000000 +0000
+++ include/drm/drm.h
@@ -618,7 +618,11 @@ struct drm_get_cap {
__u64 value;
};
+#ifdef O_CLOEXEC
#define DRM_CLOEXEC O_CLOEXEC
+#else
+#define DRM_CLOEXEC 0
+#endif
struct drm_prime_handle {
__u32 handle;