Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liss-h committed Sep 17, 2024
1 parent b6b197d commit 5b3e4db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dice/ffi/metall.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdbool.h>
#include <stddef.h>

#if METALL_VERSION >= 2800
#if __has_include(<metall/logger_interface.h>)
#include <metall/logger_interface.h>
#endif

Expand Down
2 changes: 2 additions & 0 deletions test_package/example.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <dice/ffi/metall.h>

#if __has_include(<metall/logger_interface.h>)
extern "C" void metall_log(metall_log_level, char const *, size_t, char const *) {
// noop
}
#endif

int main() {
metall_open("/tmp/test");
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_Sanity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <string>
#include <random>

#if METALL_VERSION >= 2800
#if __has_include(<metall/logger_interface.h>)
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;
}
Expand Down

0 comments on commit 5b3e4db

Please sign in to comment.