[packages/libu2f-server] - added json-c patch (fixes build with json-c 0.14); release 3

qboosh qboosh at pld-linux.org
Fri May 1 21:34:38 CEST 2020


commit 5804818ca27539c01ae524fbcc440d7163545e95
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri May 1 21:34:56 2020 +0200

    - added json-c patch (fixes build with json-c 0.14); release 3

 libu2f-server-json-c.patch | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 libu2f-server.spec         |  4 ++-
 2 files changed, 77 insertions(+), 1 deletion(-)
---
diff --git a/libu2f-server.spec b/libu2f-server.spec
index aa3a5c7..cc23173 100644
--- a/libu2f-server.spec
+++ b/libu2f-server.spec
@@ -6,11 +6,12 @@ Summary:	Yubico Universal 2nd Factor (U2F) Server C Library
 Summary(pl.UTF-8):	Biblioteka C serwera Universal 2nd Factor (U2F) Yubico
 Name:		libu2f-server
 Version:	1.1.0
-Release:	2
+Release:	3
 License:	BSD
 Group:		Libraries
 Source0:	https://developers.yubico.com/libu2f-server/Releases/%{name}-%{version}.tar.xz
 # Source0-md5:	7350f22ff60f21133a2f78d050448dae
+Patch0:		%{name}-json-c.patch
 URL:		https://developers.yubico.com/libu2f-server/
 BuildRequires:	gengetopt
 BuildRequires:	help2man
@@ -61,6 +62,7 @@ Statyczna biblioteka libu2f-server.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
diff --git a/libu2f-server-json-c.patch b/libu2f-server-json-c.patch
new file mode 100644
index 0000000..ca2b570
--- /dev/null
+++ b/libu2f-server-json-c.patch
@@ -0,0 +1,74 @@
+--- libu2f-server-1.1.0/u2f-server/core.c.orig	2017-12-18 12:52:12.000000000 +0100
++++ libu2f-server-1.1.0/u2f-server/core.c	2020-05-01 21:22:03.319276115 +0200
+@@ -41,7 +41,7 @@
+ #define u2fs_json_object_object_get(obj, key, value) json_object_object_get_ex(obj, key, &value)
+ #else
+ 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
++#define u2fs_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)0 : (json_bool)1
+ #endif
+ 
+ static u2fs_rc encode_b64u(const char *data, size_t data_len, char *output)
+@@ -477,7 +477,7 @@
+   if (jo == NULL)
+     return U2FS_JSON_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "challenge", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "challenge", k) == 0)
+     return U2FS_JSON_ERROR;
+ 
+   p = json_object_get_string(k);
+@@ -488,7 +488,7 @@
+   if (*challenge == NULL)
+     return U2FS_MEMORY_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "origin", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "origin", k) == 0)
+     return U2FS_JSON_ERROR;
+ 
+   p = json_object_get_string(k);
+@@ -520,7 +520,7 @@
+   if (jo == NULL)
+     return U2FS_JSON_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "registrationData", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "registrationData", k) == 0)
+     return U2FS_JSON_ERROR;
+   p = json_object_get_string(k);
+   if (p == NULL)
+@@ -529,7 +529,7 @@
+   if (*registrationData == NULL)
+     return U2FS_MEMORY_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "clientData", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "clientData", k) == 0)
+     return U2FS_JSON_ERROR;
+   p = json_object_get_string(k);
+   if (p == NULL)
+@@ -1125,7 +1125,7 @@
+   if (jo == NULL)
+     return U2FS_JSON_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "signatureData", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "signatureData", k) == 0)
+     return U2FS_JSON_ERROR;
+   p = json_object_get_string(k);
+   if (p == NULL)
+@@ -1134,7 +1134,7 @@
+   if (*signatureData == NULL)
+     return U2FS_MEMORY_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "clientData", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "clientData", k) == 0)
+     return U2FS_JSON_ERROR;
+   p = json_object_get_string(k);
+   if (p == NULL)
+@@ -1143,7 +1143,7 @@
+   if (*clientData == NULL)
+     return U2FS_MEMORY_ERROR;
+ 
+-  if (u2fs_json_object_object_get(jo, "keyHandle", k) == FALSE)
++  if (u2fs_json_object_object_get(jo, "keyHandle", k) == 0)
+     return U2FS_JSON_ERROR;
+   p = json_object_get_string(k);
+   if (p == NULL)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libu2f-server.git/commitdiff/5804818ca27539c01ae524fbcc440d7163545e95



More information about the pld-cvs-commit mailing list