From 54078be4098a5809ccff680b4db98ec0d280e121 Mon Sep 17 00:00:00 2001 From: chrysn Date: Sun, 8 Nov 2020 06:44:45 +0100 Subject: [PATCH] hacl: Patch to fix building where PRIx64 is absent Quoting the inner commit: > Not all RIOT platforms provide a PRIx64 or even 64-bit printing. > > As the debug routines that actually use this definition are unlikely to > be used with RIOT, providing a definition that builds (and, depending on > platform support, may or may not produce correct output) is a suitable > fix. --- .../0002-RIOT-Provide-PRIx64-if-needed.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkg/hacl/patches/0002-RIOT-Provide-PRIx64-if-needed.patch diff --git a/pkg/hacl/patches/0002-RIOT-Provide-PRIx64-if-needed.patch b/pkg/hacl/patches/0002-RIOT-Provide-PRIx64-if-needed.patch new file mode 100644 index 0000000000..81ecad7d1f --- /dev/null +++ b/pkg/hacl/patches/0002-RIOT-Provide-PRIx64-if-needed.patch @@ -0,0 +1,32 @@ +From e24924004bfa6914029a2db693fdb512c35f1785 Mon Sep 17 00:00:00 2001 +From: chrysn +Date: Sun, 8 Nov 2020 06:40:16 +0100 +Subject: [PATCH] RIOT: Provide PRIx64 if needed + +Not all RIOT platforms provide a PRIx64 or even 64-bit printing. + +As the debug routines that actually use this definition are unlikely to +be used with RIOT, providing a definition that builds (and, depending on +platform support, may or may not produce correct output) is a suitable +fix. +--- + kremlib.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/kremlib.h b/kremlib.h +index 138846a..2fce712 100644 +--- a/kremlib.h ++++ b/kremlib.h +@@ -25,6 +25,9 @@ + + #include "kremlib_base.h" + ++#ifndef PRIx64 ++#define PRIx64 "llx" ++#endif + + /* For tests only: we might need this function to be forward-declared, because + * the dependency on WasmSupport appears very late, after SimplifyWasm, and +-- +2.29.2 +