From 5b3e4db58df930e3141932e98b2669151655c07c Mon Sep 17 00:00:00 2001 From: Liss Heidrich <31625940+liss-h@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:39:12 +0200 Subject: [PATCH] fix --- src/dice/ffi/metall.h | 2 +- test_package/example.cpp | 2 ++ tests/tests_Sanity.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dice/ffi/metall.h b/src/dice/ffi/metall.h index 923d505..c7f4235 100644 --- a/src/dice/ffi/metall.h +++ b/src/dice/ffi/metall.h @@ -4,7 +4,7 @@ #include #include -#if METALL_VERSION >= 2800 +#if __has_include() #include #endif diff --git a/test_package/example.cpp b/test_package/example.cpp index 9d06265..a160b9e 100644 --- a/test_package/example.cpp +++ b/test_package/example.cpp @@ -1,8 +1,10 @@ #include +#if __has_include() extern "C" void metall_log(metall_log_level, char const *, size_t, char const *) { // noop } +#endif int main() { metall_open("/tmp/test"); diff --git a/tests/tests_Sanity.cpp b/tests/tests_Sanity.cpp index 31832eb..eefb935 100644 --- a/tests/tests_Sanity.cpp +++ b/tests/tests_Sanity.cpp @@ -6,7 +6,7 @@ #include #include -#if METALL_VERSION >= 2800 +#if __has_include() extern "C" void metall_log(metall_log_level lvl, char const *file, size_t line, char const *msg) { std::cerr << lvl << " " << file << ":" << line << ": " << msg << std::endl; }