#9387 added a new test that uses libevent’s event_set_mem_functions which is sometimes not included with libevent. In particular, Gentoo only enables this when libevent is installed with the “debug” option.
Currently, this causes the build to simply fail on tests:
0test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_creation::test_method()’:
1test/raii_event_tests.cpp:39:58: error: ‘event_set_mem_functions’ was not declared in this scope
2 event_set_mem_functions(tag_malloc, realloc, tag_free);
3 ^
4test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_order::test_method()’:
5test/raii_event_tests.cpp:68:58: error: ‘event_set_mem_functions’ was not declared in this scope
6 event_set_mem_functions(tag_malloc, realloc, tag_free);
7 ^
8Makefile:8355: recipe for target 'test/test_test_bitcoin-raii_event_tests.o' failed
Probably we should skip this test if libevent doesn’t support overriding memory functions.
(event.h defines EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED if it is available.)