From aff7ac7ef469f96a55063ba423af66fca17c29c7 Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Mon, 18 Aug 2014 23:22:19 +0400 Subject: Fix build without debug When building without debug build fails with: CCLD p11-kit/p11-kit ./.libs/libp11-kit.so: undefined reference to `P11_RPC_CHECK_CALLS' cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [p11-kit/p11-kit] Error 1 This happens because P11_RPC_CHECK_CALLS is not defined when debugging is enabled, so provide a noop macro for that case. --- p11-kit/rpc-message.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p11-kit/rpc-message.h b/p11-kit/rpc-message.h index f85265b..fc4d06e 100644 --- a/p11-kit/rpc-message.h +++ b/p11-kit/rpc-message.h @@ -207,6 +207,8 @@ static const p11_rpc_call p11_rpc_calls[] = { #ifdef _DEBUG #define P11_RPC_CHECK_CALLS() \ { int i; for (i = 0; i < P11_RPC_CALL_MAX; ++i) assert (p11_rpc_calls[i].call_id == i); } +#else +#define P11_RPC_CHECK_CALLS() #endif #define P11_RPC_HANDSHAKE \ -- cgit v1.1