-
Michał Kępień authored
Weak symbols are handled differently by different dynamic linkers. With glibc, lib/dns/tests/tkey_test works as expected no matter whether --with-libtool is used or not: __attribute__((weak)) prevents a static build from failing and it just so happens that the desired symbols are picked at runtime for dynamic builds. However, with BSD libc, the libdns functions called from lib/dns/tests/tkey_test.c use the "real" memory allocation functions from libisc, thus breaking that unit test. (Note: similar behavior can be reproduced with glibc by setting the LD_DYNAMIC_WEAK environment variable.) The simplest way to make lib/dns/tests/tkey_test work reliably is to drop all uses of __attribute__((weak)) in it - this way, the memory functions inside lib/dns/tests/tkey_test.c will always be used instead of the "real" libisc ones for dynamic builds. However, this would not work with static builds as it would result in multiple strong symbols with the same name being pre...
119f3e0c