aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>2018-09-13 15:27:13 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-09-13 20:51:55 +0200
commitc5a7028d497d661525fff90dd77e4b62bdf5daa0 (patch)
treebcfec4240757d7ec47cefc4a34a738b979cd4a93 /package
parentf99efd731c2e4f8f64ce312d535b55f1025eb593 (diff)
downloadbuildroot-c5a7028d497d661525fff90dd77e4b62bdf5daa0.tar.gz
buildroot-c5a7028d497d661525fff90dd77e4b62bdf5daa0.tar.bz2
libusbgx: fix build with glibc-2.28
Since https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html sys/sysmacros.h must be explicitly included. Without sys/sysmacros.h and with glibc-2.28 build fails with error like: src/.libs/libusbgx.so: undefined reference to minor' src/.libs/libusbgx.so: undefined reference tomajor' src/.libs/libusbgx.so: undefined reference to `makedev' backport pr #29 (https://github.com/libusbgx/libusbgx/pull/29) (now applied) Fixes: http://autobuild.buildroot.net/results/872e2ab084c0c9bf466265d2f66140fbba692ee6/ Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package')
-rw-r--r--package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch b/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch
new file mode 100644
index 0000000000..0f47454f7a
--- /dev/null
+++ b/package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch
@@ -0,0 +1,98 @@
+From 45c14ef4d5d7ced0fbf984208de44ced6d5ed898 Mon Sep 17 00:00:00 2001
+From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
+Date: Mon, 10 Sep 2018 15:52:09 +0200
+Subject: [PATCH] libusbgx: fix build with glibc-2.28 since <sys/sysmacros.h>
+ is no more included by <sys/types.h>
+
+Since https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html sys/sysmacros.h
+must be explicitly included.
+Without sys/sysmacros.h and with glibc-2.28 build fails with error like:
+src/.libs/libusbgx.so: undefined reference to minor' src/.libs/libusbgx.so: undefined reference tomajor'
+src/.libs/libusbgx.so: undefined reference to `makedev'
+
+Signed-off-by: Sid Spry <R030t1@gmail.com>
+Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
+---
+ examples/gadget-acm-ecm.c | 1 +
+ examples/gadget-import.c | 1 +
+ examples/gadget-ms.c | 1 +
+ examples/show-gadgets.c | 1 +
+ examples/show-udcs.c | 1 +
+ include/usbg/usbg_internal_libconfig.h | 1 +
+ 6 files changed, 6 insertions(+)
+
+diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
+index 1c5e2ca..29360da 100644
+--- a/examples/gadget-acm-ecm.c
++++ b/examples/gadget-acm-ecm.c
+@@ -20,6 +20,7 @@
+
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <linux/usb/ch9.h>
+ #include <usbg/usbg.h>
+
+diff --git a/examples/gadget-import.c b/examples/gadget-import.c
+index e684fdb..63df449 100644
+--- a/examples/gadget-import.c
++++ b/examples/gadget-import.c
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <usbg/usbg.h>
+
+ int main(int argc, char **argv)
+diff --git a/examples/gadget-ms.c b/examples/gadget-ms.c
+index 478c370..a5c6681 100644
+--- a/examples/gadget-ms.c
++++ b/examples/gadget-ms.c
+@@ -23,6 +23,7 @@
+
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <linux/usb/ch9.h>
+ #include <usbg/usbg.h>
+ #include <usbg/function/ms.h>
+diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c
+index 707d448..a2a21c8 100644
+--- a/examples/show-gadgets.c
++++ b/examples/show-gadgets.c
+@@ -21,6 +21,7 @@
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/sysmacros.h>
+ #include <netinet/ether.h>
+ #include <usbg/usbg.h>
+ #include <usbg/function/ms.h>
+diff --git a/examples/show-udcs.c b/examples/show-udcs.c
+index 66e950f..2f5cc45 100644
+--- a/examples/show-udcs.c
++++ b/examples/show-udcs.c
+@@ -23,6 +23,7 @@
+
+ #include <errno.h>
+ #include <stdio.h>
++#include <sys/sysmacros.h>
+ #include <usbg/usbg.h>
+
+ int main(void)
+diff --git a/include/usbg/usbg_internal_libconfig.h b/include/usbg/usbg_internal_libconfig.h
+index ac51758..3fa55c0 100644
+--- a/include/usbg/usbg_internal_libconfig.h
++++ b/include/usbg/usbg_internal_libconfig.h
+@@ -12,6 +12,7 @@
+ #ifndef USBG_INTERNAL_LIBCONFIG_H
+ #define USBG_INTERNAL_LIBCONFIG_H
+
++#include <sys/sysmacros.h>
+ #include <libconfig.h>
+ #ifdef __cplusplus
+ extern "C" {
+--
+2.16.4
+