From patchwork Tue Feb 14 20:34:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 727981 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vNDgT5sT4z9s0Z for ; Wed, 15 Feb 2017 07:35:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F41B8803B; Tue, 14 Feb 2017 20:35:00 +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 TS+DUOElH5x9; Tue, 14 Feb 2017 20:34:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2D29D86777; Tue, 14 Feb 2017 20:34:58 +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 5ADCB1BFB44 for ; Tue, 14 Feb 2017 20:34:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 59CCE86777 for ; Tue, 14 Feb 2017 20:34: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 OYeu4uC2NbvB for ; Tue, 14 Feb 2017 20:34:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by whitealder.osuosl.org (Postfix) with ESMTPS id BBF5985C91 for ; Tue, 14 Feb 2017 20:34:55 +0000 (UTC) Received: from linux.local ([188.110.174.50]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MVMgI-1ctbAA2H1C-00Yibx for ; Tue, 14 Feb 2017 21:34:52 +0100 From: Peter Seiderer To: buildroot@busybox.net Date: Tue, 14 Feb 2017 21:34:50 +0100 Message-Id: <20170214203450.7449-1-ps.report@gmx.net> X-Mailer: git-send-email 2.11.0 X-Provags-ID: V03:K0:PRQw1T9+sjLnzIq/sdN0ArxwByTyP6ymNzrSXFkjR0v1ALJz1Au jJTyxY87Y35iN+oG7nLVNBKTFb8WgBtnWebnXzbdzbsSjGtIaQ+eKpiflclYEPcf1ecBbB2 +Vk1zsCso28FhyQyX1OoI3dt/ryfNbSDmT6Hs/P8x2lZgOSQ46UN9uIvneU9XTvIvpv88y5 wQD19xtveyWhwcUAOgnPA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ppj7s38VEug=:EcL03EbZW3E7EXi4jGqHH1 k/GueBndL2VkLs+Flydn5YCkkm+8CvOVi69NwTp5/2DtdZrXSN853AyAMzusEHHehb3ssllJk Bb+xF5lreQ5lFeq3XqzKJ/EOkhf0G+nPboWDMLtu6UgCN8UpS9HXYTp3mo9n0DJs3vGmUPU1d ZKHFnuIWAZnaTJWQCWjsdw+8J9Tc1d1kFYUaC7wjjDsRZ/HxGpWyB5FvL6J09oPTRdSFR+nnH 85Ytb0qZ4gLUfOyDqqqLhhxkV0Pp9JIbfoTDgiM71EQQcZMGYCtxHlZ60PlRzM2anT/TFBxrv vGW4IPHHZgg75/hAwFPAU2DQVf2LjGq9JEcWBjev9IVznI/pF/VTuTsCdfzmc8zr2WcN/D9RQ eIlCBdUywB5C6Mo+sEdiU8X9P6Gi0Qt55sDOqn6fk15XA5MCf80A7Klbeq7zQjGabeZAiPf8H Mg+26f6+4JKhgRQ80tLavF8evlJc6Ysjy5I5smC5pk7sRyIvJV3JGKI5PbhlsF/USqj/Lhylz V8pR6dQlB6JYUCfJV902X3f6IxuFCbV1nELyYn7NEkvGSpxbZSTrvmGJSlWGlxa4SHKmOOz7Y BN+lbQFEhaqAoHxPnzv9qWRewCtq3sRRhFMbMPoYkkQKh6YD5ToztJuIjsqNRKU4xO9sCoLmZ dVkP6dRZb0ZnR0nBOetU+jwLubHjZh5OtbO0KV2LwDZqrlVwp/b/UbyGSXS7HnhOuEq0j4q1w Qhgx9IF1HviGwkGurqxYBtEGoPi2eDe1Lh63jnd7cgidG3Pm6YjtQd3ttAg= Subject: [Buildroot] [PATCH v1] libv4l/ir-ctl: fix musl compile 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" - add copy of TEMP_FAILURE_RETRY macro - use strdup instead of strdupa Fixes [1]: ir-ctl.c:(.text+0xb06): undefined reference to `strndupa' ir-ctl.c:(.text+0xe01): undefined reference to `TEMP_FAILURE_RETRY' [1] http://autobuild.buildroot.net/results/b8b96c7bbf2147dacac62485cbfdbcfd758271a5 Signed-off-by: Peter Seiderer --- .../0002-ir-ctl-fixes-for-musl-compile.patch | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/libv4l/0002-ir-ctl-fixes-for-musl-compile.patch diff --git a/package/libv4l/0002-ir-ctl-fixes-for-musl-compile.patch b/package/libv4l/0002-ir-ctl-fixes-for-musl-compile.patch new file mode 100644 index 000000000..5bce2d916 --- /dev/null +++ b/package/libv4l/0002-ir-ctl-fixes-for-musl-compile.patch @@ -0,0 +1,59 @@ +From 9908872aaa614a6c4bba80d7a5f1adea7ca7117e Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 14 Feb 2017 21:27:59 +0100 +Subject: [PATCH] ir-ctl: fixes for musl compile + +- add copy of TEMP_FAILURE_RETRY macro +- use strdup instead of strdupa + +Fixes [1]: + + ir-ctl.c:(.text+0xb06): undefined reference to `strndupa' + ir-ctl.c:(.text+0xe01): undefined reference to `TEMP_FAILURE_RETRY' + +[1] http://autobuild.buildroot.net/results/b8b96c7bbf2147dacac62485cbfdbcfd758271a5 + +Signed-off-by: Peter Seiderer +--- + utils/ir-ctl/ir-ctl.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c +index bc58cee..e9da777 100644 +--- a/utils/ir-ctl/ir-ctl.c ++++ b/utils/ir-ctl/ir-ctl.c +@@ -44,6 +44,15 @@ + + # define N_(string) string + ++/* taken from glibc unistd.h */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif + + /* See drivers/media/rc/ir-lirc-codec.c line 23 */ + #define LIRCBUF_SIZE 512 +@@ -344,12 +353,14 @@ static struct file *read_scancode(const char *name) + return NULL; + } + +- pstr = strndupa(name, p - name); ++ pstr = strndup(name, p - name); + + if (!protocol_match(pstr, &proto)) { + fprintf(stderr, _("error: protocol '%s' not found\n"), pstr); ++ free(pstr); + return NULL; + } ++ free(pstr); + + if (!strtoscancode(p + 1, &scancode)) { + fprintf(stderr, _("error: invalid scancode '%s'\n"), p + 1); +-- +2.11.0 +