gentoo/dev-libs/libmacaroons/files/libmacaroons-0.3.0-json-c.patch
Guilherme Amadio 5ef44690f8
dev-libs/libmacaroons: new package, add 0.3.0
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
2023-06-08 13:58:48 +02:00

39 lines
832 B
Diff

Fix build with JSON support enabled
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ Please install libjson to continue.
----------------------------------------])
fi
- AC_CHECK_HEADER([json/json.h],,[AC_MSG_ERROR([
+ AC_CHECK_HEADER([json-c/json.h],,[AC_MSG_ERROR([
----------------------------------------
Macaroons rely upon the libjson library.
Please install libjson to continue.
diff --git a/macaroons.c b/macaroons.c
index ab296c8..654edfc 100644
--- a/macaroons.c
+++ b/macaroons.c
@@ -32,12 +32,17 @@
/* C */
#include <assert.h>
+#include <stdbool.h>
#include <stdio.h>
#include <string.h>
+#define TRUE true
+#define FALSE false
+
/* json */
#ifdef MACAROONS_JSON_SUPPORT
-#include <json/json.h>
+#include <json-c/json.h>
+#include <json-c/json_object.h>
#endif
/* macaroons */
--