commit 4ffcde81259c9d1322884987ea061618ff88d52f
parent d4da6b5bec3ceead4b70549fc9a6589d31bdba60
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Wed, 2 Nov 2022 11:23:03 +0100
json: Set defines before including shared/jsmn.h
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
@@ -588,8 +588,7 @@ EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \
AM_CFLAGS = $(ell_cflags) -fvisibility=hidden \
-DUNITDIR=\""$(top_srcdir)/unit/"\" \
- -DCERTDIR=\""$(top_builddir)/unit/"\" \
- -DJSMN_PARENT_LINKS -DJSMN_STRICT
+ -DCERTDIR=\""$(top_builddir)/unit/"\"
if MAINTAINER_MODE
AM_CFLAGS += -DHAVE_PKCS8_SUPPORT
diff --git a/src/json.c b/src/json.c
@@ -30,6 +30,9 @@
#include "src/json.h"
+#define JSMN_STATIC
+#define JSMN_STRICT
+#define JSMN_PARENT_LINKS
#include "shared/jsmn.h"
/* Max number of tokens supported. Increase if larger objects are expected */