From 1561320a00b4a006cd9d917adf1db4c40a9db238 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 26 Sep 2026 12:57:02 +0200 Subject: [PATCH] lib,main,types: include json-c compat shim where needed Previous refactoring dropped the json-c-compat.h header include since the test system did not require it. Re-introduce as internal header and include in the appropriate places. Fixes: #441 Signed-off-by: Jo-Philipp Wich --- json-c-compat.h => include/ucode/internal/json-c-compat.h | 0 lib.c | 1 + main.c | 2 ++ types.c | 1 + 4 files changed, 4 insertions(+) rename json-c-compat.h => include/ucode/internal/json-c-compat.h (100%) diff --git a/json-c-compat.h b/include/ucode/internal/json-c-compat.h similarity index 100% rename from json-c-compat.h rename to include/ucode/internal/json-c-compat.h diff --git a/lib.c b/lib.c index a35d5907..5ac07640 100644 --- a/lib.c +++ b/lib.c @@ -50,6 +50,7 @@ #include "ucode/internal/source.h" #include "ucode/internal/program.h" #include "ucode/internal/platform.h" +#include "ucode/internal/json-c-compat.h" static void format_context_line(uc_stringbuf_t *buf, const char *line, size_t off, bool compact) diff --git a/main.c b/main.c index e3684198..873eb832 100644 --- a/main.c +++ b/main.c @@ -30,6 +30,8 @@ #include "ucode/source.h" #include "ucode/program.h" +#include "ucode/internal/json-c-compat.h" + #ifdef __GLIBC__ # define POSIXLY_CORRECT_FLAG "+" #else diff --git a/types.c b/types.c index 1ec463ca..5b6027d0 100644 --- a/types.c +++ b/types.c @@ -25,6 +25,7 @@ #include "ucode/internal/vm.h" /* ISA: I_* opcodes */ #include "ucode/internal/program.h" #include "ucode/internal/chunk.h" +#include "ucode/internal/json-c-compat.h" static char *uc_default_search_path[] = { LIB_SEARCH_PATH };