From patchwork Sat Feb 16 17:34:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 221005 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id D54A32C008E for ; Sun, 17 Feb 2013 04:34:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A9EC62FAA4; Sat, 16 Feb 2013 17:34:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2hcpVgfhq-AC; Sat, 16 Feb 2013 17:34:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 483B52E317; Sat, 16 Feb 2013 17:34:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5195E8F74B for ; Sat, 16 Feb 2013 17:34:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A1D538880D for ; Sat, 16 Feb 2013 17:34:33 +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 pDdjc2qudRFw for ; Sat, 16 Feb 2013 17:34:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5B0218681E for ; Sat, 16 Feb 2013 17:34:32 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1U6lei-0008Rz-4W; Sat, 16 Feb 2013 18:34:32 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.80) (envelope-from ) id 1U6led-00071i-Vl; Sat, 16 Feb 2013 18:34:28 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Sat, 16 Feb 2013 18:34:27 +0100 Message-Id: <1361036067-26971-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361034167-10068-1-git-send-email-arnout@mind.be> References: <1361034167-10068-1-git-send-email-arnout@mind.be> Subject: [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net From: "Arnout Vandecappelle (Essensium/Mind)" neard uses the linux/nfc.h header which is fairly recent, so we have a patch that creates linux-nfc.h and uses it if necessary. However, since the bump to 0.9, neard uses some symbols that are introduced in linux 3.7 so the build fails with headers 3.1 (which introduced nfc.h) to 3.6. To resolve that, add a check for one of the newly introduced symbols (that is used by neard). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- v2: Forgot to include . Probably wanted for 2013.02. I selected the symbol to check for with 'git log -p v3.7 include/linux/nfc.h' in the kernel. --- package/neard/neard-fix-missing-linux-nfc-header.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/package/neard/neard-fix-missing-linux-nfc-header.patch b/package/neard/neard-fix-missing-linux-nfc-header.patch index b04c5da..377269e 100644 --- a/package/neard/neard-fix-missing-linux-nfc-header.patch +++ b/package/neard/neard-fix-missing-linux-nfc-header.patch @@ -8,17 +8,26 @@ As a workaround until all reasonable toolchains get this header included, add a configure check in neard to test whether this header is available or not, and if not, use our own private copy of it. +Since symbols from the v3.7 kernel header are used, but linux/nfc.h +already exists since the v3.1 kernel, check for one of the most +recently added symbols: NFC_LLCP_RAW_HEADER_SIZE. + Signed-off-by: Thomas Petazzoni +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac -@@ -88,6 +88,8 @@ +@@ -88,6 +88,12 @@ AC_SUBST(NETLINK_CFLAGS) AC_SUBST(NETLINK_LIBS) -+AC_CHECK_HEADER(linux/nfc.h, [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], [], [#include ]) ++AC_TRY_COMPILE([ ++#include ++#include ++ ], [int err[NFC_LLCP_RAW_HEADER_SIZE-2];], ++ [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], []) + AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [enable test/example scripts]),