]> granicus.if.org Git - p11-kit/commitdiff
Fix build without debug
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 18 Aug 2014 19:22:19 +0000 (23:22 +0400)
committerStef Walter <stef@thewalter.net>
Tue, 9 Sep 2014 10:35:11 +0000 (12:35 +0200)
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

index f85265b6bd4403ea62972cce657c0ac362b3f394..fc4d06e6346c412765eb84c2529539b8eec54e55 100644 (file)
@@ -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 \