From: Roman Bogorodskiy Date: Mon, 18 Aug 2014 19:22:19 +0000 (+0400) Subject: Fix build without debug X-Git-Tag: 0.21.3~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aff7ac7ef469f96a55063ba423af66fca17c29c7;p=p11-kit 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. --- 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 \