diff -r 6342cbbd1922 -r e19825a1430a src/mempool.c --- a/src/mempool.c Wed Oct 18 12:03:44 2017 +0200 +++ b/src/mempool.c Wed Oct 18 14:23:57 2017 +0200 @@ -56,7 +56,10 @@ void *ptr; } ucx_regdestr; -UCX_EXTERN void ucx_mempool_shared_destr(void* ptr) { +#ifdef __cplusplus +extern "C" +#endif +void ucx_mempool_shared_destr(void* ptr) { ucx_regdestr *rd = (ucx_regdestr*)ptr; rd->destructor(rd->ptr); }