diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2020-05-02 16:56:41 +0200 |
---|---|---|
committer | Göktürk Yüksek <gokturk@gentoo.org> | 2020-05-05 20:39:08 -0400 |
commit | 574fbc1efb046ed72d9bedf6bbdb511d76e31bc8 (patch) | |
tree | 8b72a4104b892280b0f702de8d45399eec7c81d4 /app-crypt | |
parent | app-admin/lastpass-cli: fix building with -fno-common (diff) | |
download | gentoo-574fbc1efb046ed72d9bedf6bbdb511d76e31bc8.tar.gz gentoo-574fbc1efb046ed72d9bedf6bbdb511d76e31bc8.tar.bz2 gentoo-574fbc1efb046ed72d9bedf6bbdb511d76e31bc8.zip |
app-crypt/libu2f-server: Fixed build with dev-libs/json-c-0.14
Closes: https://bugs.gentoo.org/720442
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch | 34 | ||||
-rw-r--r-- | app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch b/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch new file mode 100644 index 000000000000..823dd15abca8 --- /dev/null +++ b/app-crypt/libu2f-server/files/libu2f-server-1.1.0-jsonc014.patch @@ -0,0 +1,34 @@ +From f7c4983b31909299c47bf9b2627c84b6bfe225de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org> +Date: Mon, 13 Apr 2020 14:16:20 +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-server/core.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/u2f-server/core.c b/u2f-server/core.c +index 2fb325e..895c004 100644 +--- a/u2f-server/core.c ++++ b/u2f-server/core.c +@@ -44,6 +44,19 @@ typedef int json_bool; + #define u2fs_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 u2fs_rc encode_b64u(const char *data, size_t data_len, char *output) + { + base64_encodestate b64; diff --git a/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild b/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild index 15c7230119c7..a16820c036ea 100644 --- a/app-crypt/libu2f-server/libu2f-server-1.1.0.ebuild +++ b/app-crypt/libu2f-server/libu2f-server-1.1.0.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=6 @@ -28,6 +28,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-1.1.0-disable-help2man-gengetopt-checks.patch" + "${FILESDIR}/${PN}-1.1.0-jsonc014.patch" ) src_prepare() { |