From cb0cd87f23581a881fcc36e74367d53da24457d1 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 2 May 2017 15:10:43 +0200 Subject: [PATCH] fix callbacks linkage for clang/mac --- src/kernel/CMakeLists.txt | 2 +- src/kernel/callbacks.c | 3 ++- src/kernel/callbacks.h | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt index e572d0763..fe560af7a 100644 --- a/src/kernel/CMakeLists.txt +++ b/src/kernel/CMakeLists.txt @@ -17,7 +17,7 @@ group.test.c item.test.c messages.test.c order.test.c -# pathdinder.test.c +# pathfinder.test.c plane.test.c pool.test.c race.test.c diff --git a/src/kernel/callbacks.c b/src/kernel/callbacks.c index d8070bd04..c1d52352a 100644 --- a/src/kernel/callbacks.c +++ b/src/kernel/callbacks.c @@ -1,4 +1,5 @@ #include #include "callbacks.h" -struct callbacks callbacks; +struct callback_struct callbacks = { 0 }; + diff --git a/src/kernel/callbacks.h b/src/kernel/callbacks.h index 71f3900c4..f42d25d3f 100644 --- a/src/kernel/callbacks.h +++ b/src/kernel/callbacks.h @@ -25,11 +25,13 @@ extern "C" { struct castorder; - extern struct callbacks { + struct callback_struct { int (*cast_spell)(struct castorder *co, const char *fname); - } callbacks; + }; + extern struct callback_struct callbacks; #ifdef __cplusplus } #endif #endif /* H_KRNL_CALLBACKS_H */ +