diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2020-05-02 00:12:39 -0600 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2020-05-02 00:15:15 -0600 |
commit | 156ccdd04fc7dc9403041a144d584a1140741e6e (patch) | |
tree | ee480f842cf4afdff79af727d8d988f92b01641f /app-crypt | |
parent | net-im/zoom: Version bump to 5.0.399860.0429. (diff) | |
download | gentoo-156ccdd04fc7dc9403041a144d584a1140741e6e.tar.gz gentoo-156ccdd04fc7dc9403041a144d584a1140741e6e.tar.bz2 gentoo-156ccdd04fc7dc9403041a144d584a1140741e6e.zip |
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 <zx2c4@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/libu2f-host/files/libu2f-host-1.1.10-json-boolean.patch | 34 | ||||
-rw-r--r-- | app-crypt/libu2f-host/libu2f-host-1.1.10.ebuild | 4 |
2 files changed, 37 insertions, 1 deletions
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 000000000000..cee17d5b0b04 --- /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?= <besser82@fedoraproject.org> +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 0c27d050b295..3355f7bcc195 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 |