]> code.ossystems Code Review - openembedded-core.git/commitdiff
libdrm: fix build with uclibc
authorMaxin B. John <maxin.john@intel.com>
Tue, 23 Feb 2016 10:05:02 +0000 (12:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 28 Feb 2016 11:32:35 +0000 (11:32 +0000)
Fix 'O_CLOEXEC' undeclared error with uclibc

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch [new file with mode: 0644]
meta/recipes-graphics/drm/libdrm_2.4.66.bb

diff --git a/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
new file mode 100644 (file)
index 0000000..286e548
--- /dev/null
@@ -0,0 +1,24 @@
+drmdevice.c: define _GNU_SOURCE
+
+Include config.h to fix this build error with uclibc:
+
+libdrm-2.4.66/tests/drmdevice.c: In function 'main':
+libdrm-2.4.66/tests/drmdevice.c:96:60: error:
+'O_CLOEXEC' undeclared (first use in this function)
+fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0);
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
+--- libdrm-2.4.66-orig/tests/drmdevice.c       2016-02-23 11:34:02.054904502 +0200
++++ libdrm-2.4.66/tests/drmdevice.c    2016-02-23 11:35:34.371750383 +0200
+@@ -21,6 +21,7 @@
+  *
+  */
++#include <config.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
index 3280920de1c453ad3d0a6a3552f093a74c9fd7c7..79cd94af8c88e5ebf71a0930fed124c4417c8abc 100644 (file)
@@ -14,6 +14,7 @@ SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
            file://installtests.patch \
            file://0001-tests-kms-steal-crtc-Include-sys-select.h.patch \
            file://detect.patch \
+           file://fix_O_CLOEXEC_undeclared.patch \
           "
 
 SRC_URI[md5sum] = "c6809c48538d6e5999588832045ff014"