From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47BC3138350 for ; Sat, 2 May 2020 06:15:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 65ED3E092A; Sat, 2 May 2020 06:15:32 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3D4F7E092A for ; Sat, 2 May 2020 06:15:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D048F34F0FF for ; Sat, 2 May 2020 06:15:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 089031FB for ; Sat, 2 May 2020 06:15:28 +0000 (UTC) From: "Jason A. Donenfeld" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason A. Donenfeld" Message-ID: <1588400115.156ccdd04fc7dc9403041a144d584a1140741e6e.zx2c4@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/libu2f-host/files/, app-crypt/libu2f-host/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild X-VCS-Directories: app-crypt/libu2f-host/files/ app-crypt/libu2f-host/ X-VCS-Committer: zx2c4 X-VCS-Committer-Name: Jason A. Donenfeld X-VCS-Revision: 156ccdd04fc7dc9403041a144d584a1140741e6e X-VCS-Branch: master Date: Sat, 2 May 2020 06:15:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 17da30a8-b150-4e52-888f-bfd41b728fb5 X-Archives-Hash: 10269b6688c12114e293fcaf0bd46e9d commit: 156ccdd04fc7dc9403041a144d584a1140741e6e Author: Jason A. Donenfeld gentoo org> AuthorDate: Sat May 2 06:12:39 2020 +0000 Commit: Jason A. Donenfeld gentoo org> CommitDate: Sat May 2 06:15:15 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156ccdd0 app-crypt/libu2f-host: account for c-json changes Fixes: https://bugs.gentoo.org/720358 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Jason A. Donenfeld gentoo.org> .../files/libu2f-host-1.1.10-json-boolean.patch | 34 ++++++++++++++++++++++ app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch b/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch new file mode 100644 index 00000000000..cee17d5b0b0 --- /dev/null +++ b/app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch @@ -0,0 +1,34 @@ +From 840f01135d2892f45e71b9e90405de587991bd03 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Mon, 13 Apr 2020 14:12:25 +0200 +Subject: [PATCH] Add support for upcoming json-c 0.14.0. + +TRUE/FALSE are not defined anymore. 1 and 0 are used instead. +--- + u2f-host/u2fmisc.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/u2f-host/u2fmisc.c b/u2f-host/u2fmisc.c +index e40ca3d..5a032ce 100644 +--- a/u2f-host/u2fmisc.c ++++ b/u2f-host/u2fmisc.c +@@ -33,6 +33,19 @@ typedef int json_bool; + #define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE + #endif + ++/* json-c 0.13.99 does not define TRUE/FALSE anymore ++ * the json-c maintainers replaced them with pure 1/0 ++ * https://github.com/json-c/json-c/commit/0992aac61f8b ++ */ ++#if defined JSON_C_VERSION_NUM && JSON_C_VERSION_NUM >= ((13 << 8) | 99) ++#ifndef FALSE ++#define FALSE 0 ++#endif ++#ifndef TRUE ++#define TRUE 1 ++#endif ++#endif ++ + static void + dumpHex (unsigned char *data, int offs, int len) + { diff --git a/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild b/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild index 0c27d050b29..3355f7bcc19 100644 --- a/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild +++ b/app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -25,6 +25,8 @@ BDEPEND="virtual/pkgconfig" CONFIG_CHECK="~HIDRAW" +PATCHES=( "${FILESDIR}/${P}-json-boolean.patch" ) + src_install() { default if use kernel_linux; then