From patchwork Mon Nov 28 16:35:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 700055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tSC3p16Ddz9vFb for ; Tue, 29 Nov 2016 03:36:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8D1A086E19; Mon, 28 Nov 2016 16:36:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ne3_xQZtumhm; Mon, 28 Nov 2016 16:36:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D3BA686E04; Mon, 28 Nov 2016 16:36:02 +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 ED6801C0680 for ; Mon, 28 Nov 2016 16:35:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EBCDD87141 for ; Mon, 28 Nov 2016 16:35:57 +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 DvNtJQZ8FH18 for ; Mon, 28 Nov 2016 16:35:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by whitealder.osuosl.org (Postfix) with ESMTPS id B53AE870F2 for ; Mon, 28 Nov 2016 16:35:56 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 28 Nov 2016 08:35:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,564,1473145200"; d="scan'208"; a="1065243162" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 28 Nov 2016 08:35:54 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9ED922CF; Mon, 28 Nov 2016 18:35:53 +0200 (EET) From: Andy Shevchenko To: Erico Nunes , buildroot@buildroot.org, Peter Korsgaard Date: Mon, 28 Nov 2016 18:35:52 +0200 Message-Id: <20161128163553.173811-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161128163553.173811-1-andriy.shevchenko@linux.intel.com> References: <20161128163553.173811-1-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko Subject: [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Details at https://github.com/rhinstaller/efivar/issues/76. Signed-off-by: Andy Shevchenko --- package/efivar/0002-Allow-build-with-uClibc.patch | 38 +++++++++++++++++++++++ package/efivar/Config.in | 2 -- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 package/efivar/0002-Allow-build-with-uClibc.patch diff --git a/package/efivar/0002-Allow-build-with-uClibc.patch b/package/efivar/0002-Allow-build-with-uClibc.patch new file mode 100644 index 0000000..7b62714 --- /dev/null +++ b/package/efivar/0002-Allow-build-with-uClibc.patch @@ -0,0 +1,38 @@ +From 2255601757a8a58baddad2d37d0bcc6b003a3732 Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko +Date: Fri, 25 Nov 2016 19:42:27 +0200 +Subject: [PATCH 2/2] Allow build with uClibc + +Basically this replaces type definitions in . + +Signed-off-by: Andy Shevchenko +--- + src/export.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/export.c b/src/export.c +index 7f2d4dd..72c02d1 100644 +--- a/src/export.c ++++ b/src/export.c +@@ -21,11 +21,17 @@ + #include + #include + #include +-#include + + #include + #include "lib.h" + ++#ifdef __UCLIBC__ ++typedef int_least16_t char16_t; ++typedef int_least32_t char32_t; ++#else ++#include ++#endif ++ + #define EFIVAR_MAGIC 0xf3df1597 + + #define ATTRS_UNSET 0xa5a5a5a5a5a5a5a5 +-- +2.10.2 + diff --git a/package/efivar/Config.in b/package/efivar/Config.in index 466a30a..5fd3360 100644 --- a/package/efivar/Config.in +++ b/package/efivar/Config.in @@ -11,7 +11,6 @@ config BR2_PACKAGE_EFIVAR !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII # doesn't build with uclibc due to lack of uchar.h # doesn't build with musl due to lack of __bswap_constant_16 - depends on BR2_TOOLCHAIN_USES_GLIBC depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 select BR2_PACKAGE_POPT help @@ -21,7 +20,6 @@ config BR2_PACKAGE_EFIVAR comment "efivar requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9" depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \ - !BR2_TOOLCHAIN_USES_GLIBC || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \ !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII