summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorakuster <akuster@mvista.com>2020-09-28 12:10:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commitab2ece14f040ea315fe1ec0a71d2e7401868a8ed (patch)
tree448d1e26af77c5c12f5c71dd7cec0ce59e5accec /meta/recipes-graphics
parent3b545e61dba16b8e10c15767a11572d3fe0297be (diff)
downloadpoky-ab2ece14f040ea315fe1ec0a71d2e7401868a8ed.tar.gz
libdrm: fix build failure
Failure seen on my CentOS7 build host (From OE-Core rev: 243e13e87ac954b4197d53d6694f6335291651d5) Signed-off-by: akuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch87
-rw-r--r--meta/recipes-graphics/drm/libdrm_2.4.102.bb4
2 files changed, 90 insertions, 1 deletions
diff --git a/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch b/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch
new file mode 100644
index 0000000000..60c996ca85
--- /dev/null
+++ b/meta/recipes-graphics/drm/files/0001-xf86drm.c-fix-build-failure.patch
@@ -0,0 +1,87 @@
1From c7d89412884de2dbfa543720d185027377e62f21 Mon Sep 17 00:00:00 2001
2From: Heiko Thiery <heiko.thiery@gmail.com>
3Date: Fri, 5 Jun 2020 23:46:52 +0200
4Subject: [PATCH] xf86drm.c: fix build failure
5
6./xf86drm.c: In function 'drmNodeIsDRM':
7../xf86drm.c:2825:7: error: "__FreeBSD__" is not defined [-Werror=undef]
8 #elif __FreeBSD__
9 ^
10../xf86drm.c: In function 'drmGetMinorNameForFD':
11../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef]
12 #elif __FreeBSD__
13 ^
14../xf86drm.c: In function 'drmParsePciBusInfo':
15../xf86drm.c:3258:7: error: "__FreeBSD__" is not defined [-Werror=undef]
16 #elif __FreeBSD__
17 ^
18../xf86drm.c: In function 'drmParsePciDeviceInfo':
19../xf86drm.c:3427:7: error: "__FreeBSD__" is not defined [-Werror=undef]
20 #elif __FreeBSD__
21 ^
22../xf86drm.c: In function 'drmGetDeviceNameFromFd2':
23../xf86drm.c:4305:7: error: "__FreeBSD__" is not defined [-Werror=undef]
24 #elif __FreeBSD__
25 ^
26
27Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
28
29Upstream-Status: Backport
30Signed-off-by: Armin Kuster <akuster@mvista.com>
31
32---
33 xf86drm.c | 10 +++++-----
34 1 file changed, 5 insertions(+), 5 deletions(-)
35
36diff --git a/xf86drm.c b/xf86drm.c
37index 07a18c4..50a6f09 100644
38--- a/xf86drm.c
39+++ b/xf86drm.c
40@@ -2822,7 +2822,7 @@ static bool drmNodeIsDRM(int maj, int min)
41 snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm",
42 maj, min);
43 return stat(path, &sbuf) == 0;
44-#elif __FreeBSD__
45+#elif defined(__FreeBSD__)
46 char name[SPECNAMELEN];
47
48 if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name)))
49@@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd, int type)
50
51 closedir(sysdir);
52 return NULL;
53-#elif __FreeBSD__
54+#elif defined(__FreeBSD__)
55 struct stat sbuf;
56 char dname[SPECNAMELEN];
57 const char *mname;
58@@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
59 info->func = pinfo.func;
60
61 return 0;
62-#elif __FreeBSD__
63+#elif defined(__FreeBSD__)
64 return get_sysctl_pci_bus_info(maj, min, info);
65 #else
66 #warning "Missing implementation of drmParsePciBusInfo"
67@@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj, int min,
68 device->subdevice_id = pinfo.subdevice_id;
69
70 return 0;
71-#elif __FreeBSD__
72+#elif defined(__FreeBSD__)
73 drmPciBusInfo info;
74 struct pci_conf_io pc;
75 struct pci_match_conf patterns[1];
76@@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd)
77 free(value);
78
79 return strdup(path);
80-#elif __FreeBSD__
81+#elif defined(__FreeBSD__)
82 return drmGetDeviceNameFromFd(fd);
83 #else
84 struct stat sbuf;
85--
861.8.3.1
87
diff --git a/meta/recipes-graphics/drm/libdrm_2.4.102.bb b/meta/recipes-graphics/drm/libdrm_2.4.102.bb
index fb9a94207f..ad512d14a9 100644
--- a/meta/recipes-graphics/drm/libdrm_2.4.102.bb
+++ b/meta/recipes-graphics/drm/libdrm_2.4.102.bb
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c5
10PROVIDES = "drm" 10PROVIDES = "drm"
11DEPENDS = "libpthread-stubs" 11DEPENDS = "libpthread-stubs"
12 12
13SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.xz" 13SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.xz \
14 file://0001-xf86drm.c-fix-build-failure.patch "
15
14SRC_URI[sha256sum] = "8bcbf9336c28e393d76c1f16d7e79e394a7fce8a2e929d52d3ad7ad8525ba05b" 16SRC_URI[sha256sum] = "8bcbf9336c28e393d76c1f16d7e79e394a7fce8a2e929d52d3ad7ad8525ba05b"
15 17
16inherit meson pkgconfig manpages 18inherit meson pkgconfig manpages