From patchwork Wed Aug 16 10:53:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 801990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@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=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xXR5v5ktTz9sN5 for ; Wed, 16 Aug 2017 20:53:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4F5FB89C6D; Wed, 16 Aug 2017 10:53:20 +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 Vae8Xoy8z57X; Wed, 16 Aug 2017 10:53:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CA5D089C45; Wed, 16 Aug 2017 10:53:18 +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 A768C1C1647 for ; Wed, 16 Aug 2017 10:53:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9D0D2882AD for ; Wed, 16 Aug 2017 10:53:17 +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 Ww8Fv55IWxWo for ; Wed, 16 Aug 2017 10:53:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 380E0881AC for ; Wed, 16 Aug 2017 10:53:15 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 93408440583; Wed, 16 Aug 2017 13:53:11 +0300 (IDT) From: Baruch Siach To: buildroot@busybox.net Date: Wed, 16 Aug 2017 13:53:05 +0300 Message-Id: X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH] faad2: fix build with musl libc 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" The getopt.c code declares the strncmp() routine in a non confirming way under non GNU libc. Patch the code to make the declaration standard conforming. Fixes: http://autobuild.buildroot.net/results/447/4471be349d7ad2e998a4d55afd33aa046a5d1fd2/ http://autobuild.buildroot.net/results/2a9/2a90f4f518884fb50f7ad6ab505dee7565ed869e/ http://autobuild.buildroot.net/results/6b1/6b159b766d791492bab4d897c33ce07845fb7119/ Cc: Gustavo Zacarias Signed-off-by: Baruch Siach --- .../0001-getopt-fix-strncmp-declaration.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/faad2/0001-getopt-fix-strncmp-declaration.patch diff --git a/package/faad2/0001-getopt-fix-strncmp-declaration.patch b/package/faad2/0001-getopt-fix-strncmp-declaration.patch new file mode 100644 index 000000000000..0e5f27e52af2 --- /dev/null +++ b/package/faad2/0001-getopt-fix-strncmp-declaration.patch @@ -0,0 +1,40 @@ +From 6787914efad562e4097a153988109c5c7158abf7 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 16 Aug 2017 13:35:57 +0300 +Subject: [PATCH] getopt: fix strncmp() declaration + +The strncmp() declaration does not conform with the standard as to the +type of the 'n' parameter. Fix this to avoid the following build failure +with musl libc: + +n file included from main.c:61:0: +getopt.c:175:13: error: conflicting types for 'strncmp' + extern int strncmp(const char *s1, const char *s2, unsigned int n); + ^~~~~~~ +In file included from main.c:49:0: +.../host/x86_64-buildroot-linux-musl/sysroot/usr/include/string.h:38:5: note: previous declaration of 'strncmp' was here + int strncmp (const char *, const char *, size_t); + ^~~~~~~ +Signed-off-by: Baruch Siach +--- +Upstream status: https://sourceforge.net/p/faac/bugs/217/ + + frontend/getopt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/frontend/getopt.c b/frontend/getopt.c +index 185d49b804dd..40c7a2242551 100644 +--- a/frontend/getopt.c ++++ b/frontend/getopt.c +@@ -172,7 +172,7 @@ static enum + #if __STDC__ || defined(PROTO) + extern char *getenv(const char *name); + extern int strcmp (const char *s1, const char *s2); +-extern int strncmp(const char *s1, const char *s2, unsigned int n); ++extern int strncmp(const char *s1, const char *s2, size_t n); + + static int my_strlen(const char *s); + static char *my_index (const char *str, int chr); +-- +2.14.1 +