From patchwork Sat Aug 20 11:56:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Bedarkar X-Patchwork-Id: 661132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sGdbW3Jd9z9sD6 for ; Sat, 20 Aug 2016 21:56:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EC74530A2F; Sat, 20 Aug 2016 11:56: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 vY6DT1o2nm2i; Sat, 20 Aug 2016 11:56:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9CA492D39B; Sat, 20 Aug 2016 11:56:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 99A051C2BFE for ; Sat, 20 Aug 2016 11:56:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 933972E13F for ; Sat, 20 Aug 2016 11:56:34 +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 hBwd8vXSsk5v for ; Sat, 20 Aug 2016 11:56:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by silver.osuosl.org (Postfix) with ESMTP id 5540025142 for ; Sat, 20 Aug 2016 11:56:33 +0000 (UTC) Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id DC6701D81D96F for ; Sat, 20 Aug 2016 12:56:18 +0100 (IST) Received: from PUMAIL01.pu.imgtec.org (192.168.91.250) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.294.0; Sat, 20 Aug 2016 12:56:21 +0100 Received: from pudesk287-linux.pu.imgtec.org (192.168.91.23) by PUMAIL01.pu.imgtec.org (192.168.91.250) with Microsoft SMTP Server (TLS) id 14.3.266.1; Sat, 20 Aug 2016 17:26:19 +0530 From: Rahul Bedarkar To: Date: Sat, 20 Aug 2016 17:26:04 +0530 Message-ID: <1471694164-2094-1-git-send-email-rahul.bedarkar@imgtec.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [192.168.91.23] Cc: Rahul Bedarkar Subject: [Buildroot] [PATCH 1/1] trousers: fix build issue with musl 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With musl C library, we get following build error when building trousers: tsp_tcsi_param.c:14:28: fatal error: bits/local_lim.h: No such file or directory #include ^ compilation terminated. Header is not available in musl. tsp_tcsi_param.c uses this for macro HOST_NAME_MAX. This patch add support for checking presence of header . And based on that we include it or define macro HOST_NAME_MAX to 64 if it is not already defined. Value 64 is chosen because also uses same value. Fixes: http://autobuild.buildroot.net/results/c9b/c9b13ae8d4af9ae6a65921de142c0e8da30664e0/ Signed-off-by: Rahul Bedarkar --- .../trousers/0003-fix-build-issue-with-musl.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/trousers/0003-fix-build-issue-with-musl.patch diff --git a/package/trousers/0003-fix-build-issue-with-musl.patch b/package/trousers/0003-fix-build-issue-with-musl.patch new file mode 100644 index 0000000..c34e6d4 --- /dev/null +++ b/package/trousers/0003-fix-build-issue-with-musl.patch @@ -0,0 +1,52 @@ +fix build issue with musl + +With musl C library, we get following build error when building trousers: + + tsp_tcsi_param.c:14:28: fatal error: bits/local_lim.h: No such file or directory + #include + ^ + compilation terminated. + +Header is not available in musl. tsp_tcsi_param.c +uses this for macro HOST_NAME_MAX. + +This patch add support for checking presence of header . +And based on that we include it or define macro HOST_NAME_MAX to 64 if +it is not already defined. + +Value 64 is chosen because also uses same value. + +This build issue is found by Buildroot autobuilder +http://autobuild.buildroot.net/results/c9b/c9b13ae8d4af9ae6a65921de142c0e8da30664e0/ + +Signed-off-by: Rahul Bedarkar + +--- trousers-0.3.13/configure.in.old 2016-08-20 16:35:56.887744480 +0530 ++++ trousers-0.3.13/configure.in 2016-08-20 16:36:38.643744392 +0530 +@@ -13,7 +13,7 @@ TSS_VER_MINOR=3 + AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE([foreign 1.6]) + AC_CONFIG_MACRO_DIR([m4]) +- ++AC_CHECK_HEADERS([bits/local_lim.h]) + # Debugging support + AC_ARG_ENABLE([debug], + [AC_HELP_STRING([--enable-debug], [turn on all trousers debugging flags [default=off]])], +--- trousers-0.3.13/./src/tspi/tsp_tcsi_param.c.old 2016-08-20 16:48:26.315742897 +0530 ++++ trousers-0.3.13/src/tspi/tsp_tcsi_param.c 2016-08-20 16:51:03.683742564 +0530 +@@ -11,7 +11,15 @@ + #include + #include + #include ++ ++#ifdef HAVE_BITS_LOCAL_LIM_H + #include ++#else ++#ifndef HOST_NAME_MAX ++#define HOST_NAME_MAX 64 ++#endif ++#endif ++ + #include "trousers/tss.h" + #include "trousers/trousers.h" + #include "trousers_types.h"