void-packages/srcpkgs/jsonnet/patches/fix-build-non-x86-arm.patch

28 lines
1.0 KiB
Diff

commit 9d1ebbeb750a790e0df045bf24ea2181a6ba3cf7
Author: q66 <daniel@octaforge.org>
Date: Thu Jan 6 17:06:34 2022 +0100
error: 'trap_instruction' was not declared in this scope
diff --git a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
index f570bf8..9c5fc2c 100644
--- a/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
+++ b/third_party/rapidyaml/rapidyaml/ext/c4core/src/c4/ext/debugbreak/debugbreak.h
@@ -102,13 +102,16 @@ __inline__ static void trap_instruction(void)
}
#else
enum { HAVE_TRAP_INSTRUCTION = 0, };
+#define NO_TRAP_INSTRUCTION 1
#endif
__attribute__((gnu_inline, always_inline))
__inline__ static void debug_break(void)
{
if (HAVE_TRAP_INSTRUCTION) {
+#ifndef NO_TRAP_INSTRUCTION
trap_instruction();
+#endif
} else if (DEBUG_BREAK_PREFER_BUILTIN_TRAP_TO_SIGTRAP) {
/* raises SIGILL on Linux x86{,-64}, to continue in gdb:
* (gdb) handle SIGILL stop nopass