From patchwork Thu Sep 13 13:27:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 969366 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=trabucayre.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 429zvp5Xqxz9s9N for ; Thu, 13 Sep 2018 23:27:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 61A5988A49; Thu, 13 Sep 2018 13:26:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C-8sBjZJNKwG; Thu, 13 Sep 2018 13:26:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4595788A33; Thu, 13 Sep 2018 13:26:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A729A1C2CF7 for ; Thu, 13 Sep 2018 13:26:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9F08887E4D for ; Thu, 13 Sep 2018 13:26:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qct1e6xGYtbx for ; Thu, 13 Sep 2018 13:26:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.femto-st.fr (lifc.univ-fcomte.fr [194.57.88.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id D467D87DA1 for ; Thu, 13 Sep 2018 13:26:51 +0000 (UTC) Received: from x230.femto-st.fr (nat-tf.ens2m.fr [194.167.45.244] (may be forged)) (authenticated bits=0) by mail.femto-st.fr (8.15.2/8.15.2/Debian-8) with ESMTPA id w8DDQm5Y010396; Thu, 13 Sep 2018 15:26:49 +0200 From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Thu, 13 Sep 2018 15:27:13 +0200 Message-Id: <20180913132713.29628-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.16.4 X-Scanned-By: MIMEDefang 2.79 on 194.57.88.66 Subject: [Buildroot] [PATCH v3] libusbgx: fix build with glibc-2.28 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gwenhael Goavec-Merou MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou 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) fix: http://autobuild.buildroot.net/results/872e2ab084c0c9bf466265d2f66140fbba692ee6/ Signed-off-by: Gwenhael Goavec-Merou --- Changes v2 -> v3: * use a git-formatted patch (thomas) * change SoB order (thomas) Changes v1 -> v2: * specify branch and glibc version (thomas) --- .../0001-Add-include-of-sys-sysmacro.h.patch | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 package/libusbgx/0001-Add-include-of-sys-sysmacro.h.patch 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 +Date: Mon, 10 Sep 2018 15:52:09 +0200 +Subject: [PATCH] libusbgx: fix build with glibc-2.28 since + is no more included by + +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 +Signed-off-by: Gwenhael Goavec-Merou +--- + 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 + #include ++#include + #include + #include + +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 + #include + #include ++#include + #include + + 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 + #include ++#include + #include + #include + #include +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 + #include + #include ++#include + #include + #include + #include +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 + #include ++#include + #include + + 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 + #include + #ifdef __cplusplus + extern "C" { +-- +2.16.4 +