drm: Fix compilation on systems that don't provide O_CLOEXEC

Submitted by Stefan Dirsch on April 20, 2016, 1:49 p.m.

Details

Message ID 1461160159-22345-1-git-send-email-sndirsch@suse.de
State New
Headers show
Series "drm: Fix compilation on systems that don't provide O_CLOEXEC" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Stefan Dirsch April 20, 2016, 1:49 p.m.
Patch suggestion by Thomas Klausner <wiz%NetBSD.org@localhost>. See
also http://mail-index.netbsd.org/pkgsrc-changes/2012/08/13/msg076887.html

Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
---
 include/drm/drm.h | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/include/drm/drm.h b/include/drm/drm.h
index b4ebaa9..739df01 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -674,7 +674,11 @@  struct drm_set_client_cap {
 };
 
 #define DRM_RDWR O_RDWR
+#ifdef O_CLOEXEC
 #define DRM_CLOEXEC O_CLOEXEC
+#else
+#define DRM_CLOEXEC 0
+#endif
 struct drm_prime_handle {
 	__u32 handle;
 

Comments

On Wed, Apr 20, 2016 at 03:49:19PM +0200, Stefan Dirsch wrote:
> Patch suggestion by Thomas Klausner <wiz%NetBSD.org@localhost>. See
You might want to replace that with a valid email address, or remove it :)