From patchwork Fri Aug 12 12:19:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1665866 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M42mH4HVdz9s5W for ; Fri, 12 Aug 2022 22:19:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8DB7983419; Fri, 12 Aug 2022 12:19:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8DB7983419 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zI163KaubaRS; Fri, 12 Aug 2022 12:19:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B5D5482D49; Fri, 12 Aug 2022 12:19:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B5D5482D49 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 753691BF280 for ; Fri, 12 Aug 2022 12:19:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5055A8278F for ; Fri, 12 Aug 2022 12:19:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5055A8278F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jiMa5On93IsB for ; Fri, 12 Aug 2022 12:19:19 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3364082D49 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3364082D49 for ; Fri, 12 Aug 2022 12:19:19 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id j7so1031315wrh.3 for ; Fri, 12 Aug 2022 05:19:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=WqOFoA5qGrMI5tZk7nEWUZwsZkq3C65sC7LkoRRtAZ8=; b=usz6Y//vsUFKcJNfkX6j7nrWM9RdkHH3BfA7Xb9+U1zbF9d7yxV4x3C84PosLYsivI +fXaKiPZugOWzUxFqqEJmbNW0eR258Nh3uB4L3G8ilweyjKjgwj2W6FUXzIv1wD9DzFq ohY50kqYA3X4R1e6bVA5xLpdTxttZNE2br9cvC5mfhQ0XXmJ61FzMTpehoCwA7l5wjDE bSDtL8+swWWko1rOP1vh76H3IQMtLiK6frBZSrDc9aLBx7WkZkNhcFnsaUXkRZgT3yj9 x/F1Mx+gvBmW47zgrhSg6UMShEFEkBHpNp3bwKAZktUQr1xJCMid/0qUeRZT9cTeDuS5 5ThQ== X-Gm-Message-State: ACgBeo36k7RvLqCEnhh5OV2Oc8FEa3/kpBiU1groOtlA+KJsgMajtqVO QGQwEZ3yVJHkoBfr6wFJWS2r2MLMpdk= X-Google-Smtp-Source: AA6agR5YG8PWPWZiH4uLG1UGm7/HisI7joGOhB8715gpw6fcN9iqifFQrLA4/ZrJtWvtD8J8uYD9Mg== X-Received: by 2002:a5d:47a4:0:b0:220:600f:34d8 with SMTP id 4-20020a5d47a4000000b00220600f34d8mr2080775wrb.510.1660306757191; Fri, 12 Aug 2022 05:19:17 -0700 (PDT) Received: from kali.home (2a01cb088e0b5b0048f45e83f19e0b55.ipv6.abo.wanadoo.fr. [2a01:cb08:8e0b:5b00:48f4:5e83:f19e:b55]) by smtp.gmail.com with ESMTPSA id d1-20020adfe881000000b0022062459ce5sm1793604wrm.30.2022.08.12.05.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 05:19:16 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Fri, 12 Aug 2022 14:19:13 +0200 Message-Id: <20220812121913.51447-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=WqOFoA5qGrMI5tZk7nEWUZwsZkq3C65sC7LkoRRtAZ8=; b=XhnoQ5ojlwAtwat6EV+NIyzKAHY8e3C3HXQmcSyUh/HwCP1bYJ2luzKA0aejY9jvho uy9wnKNwb5j/jqb3sUZNONvzGtlM7vGDmGGY86K4j0n5G1nAtXd6okrfzqjrj2zX70Xe eYJXxzD1YSH5epqFWtSYwNLwl0Gw29cTjHOYS9xxxAH2NKl9ONU4qzVuqhtrBvsyMvqr MajnR8O6pBPu7JoDP/gN9pIziBycXudSz+b7cEjNCVavwqF4dypUXbXFCXG06aj4MCPU Fpt4je7sUHOIe7++z5hCAxn7tfEy/vCWZMR8EMql98Y8lVkLBjSaBbNjMIMWD+HI+Ayb bN6Q== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=XhnoQ5oj Subject: [Buildroot] [PATCH 1/1] package/libp11: fix build with gcc 4.8 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Fix the following build failure with gcc 4.8 raised since bump to version 0.4.12 in commit 86ab91483dcb4b60de8c1daa20e2f42bd95ab5fb and https://github.com/OpenSC/libp11/commit/639a4b6463278c0119a2ec60b261da3e5330fb33: p11_attr.c: In function 'pkcs11_zap_attrs': p11_attr.c:167:2: error: 'for' loop initial declarations are only allowed in C99 mode for (unsigned i = 0; i < 32; i++) { ^ p11_attr.c:167:2: note: use option -std=c99 or -std=gnu99 to compile your code Fixes: - http://autobuild.buildroot.org/results/4391020fb5738cc8c26dc53783a6228bbf76473a Signed-off-by: Fabrice Fontaine --- ...rc-p11_attr.c-fix-build-with-gcc-4.8.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch diff --git a/package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch b/package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch new file mode 100644 index 0000000000..60fc16d9d0 --- /dev/null +++ b/package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch @@ -0,0 +1,42 @@ +From ba44b87318ed89e489fa3ce0a5d66002afa2bd6c Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 12 Aug 2022 11:54:54 +0200 +Subject: [PATCH] src/p11_attr.c: fix build with gcc 4.8 + +Fix the following build failure with gcc 4.8 raised since version 0.4.12 +and +https://github.com/OpenSC/libp11/commit/639a4b6463278c0119a2ec60b261da3e5330fb33: + +p11_attr.c: In function 'pkcs11_zap_attrs': +p11_attr.c:167:2: error: 'for' loop initial declarations are only allowed in C99 mode + for (unsigned i = 0; i < 32; i++) { + ^ +p11_attr.c:167:2: note: use option -std=c99 or -std=gnu99 to compile your code + +Fixes: + - http://autobuild.buildroot.org/results/4391020fb5738cc8c26dc53783a6228bbf76473a + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/OpenSC/libp11/commit/ba44b87318ed89e489fa3ce0a5d66002afa2bd6c] +--- + src/p11_attr.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/p11_attr.c b/src/p11_attr.c +index d49456ff..d425241a 100644 +--- a/src/p11_attr.c ++++ b/src/p11_attr.c +@@ -162,9 +162,11 @@ void pkcs11_addattr_obj(PKCS11_TEMPLATE *tmpl, int type, pkcs11_i2d_fn enc, void + + void pkcs11_zap_attrs(PKCS11_TEMPLATE *tmpl) + { ++ unsigned int i; ++ + if (!tmpl->allocated) + return; +- for (unsigned i = 0; i < 32; i++) { ++ for (i = 0; i < 32; i++) { + if (tmpl->allocated & (1<attrs[i].pValue); + }