Building the 2.9p5 version causes warnings due to missing 'tdestroy' declarations.
~~~~~~
ow_cache.c: In function 'Cache_Close':
ow_cache.c:285:2: warning: implicit declaration of function 'tdestroy' [-Wimplicit-function-declaration]
SAFETDESTROY( cache.persistent_tree, owfree_func);
^
ow_connect.c: In function 'RemoveIn':
ow_connect.c:243:2: warning: implicit declaration of function 'tdestroy' [-Wimplicit-function-declaration]
SAFETDESTROY( conn->dev_db, owfree_func);
^
ow_tree.c: In function 'DeviceDestroy':
ow_tree.c:85:2: warning: implicit declaration of function 'tdestroy' [-Wimplicit-function-declaration]
tdestroy( sensor_tree, owfree_func ) ;
^
~~~~~
This may cause memory leaks or memory corruption whenever objects are destroyed. Please, check if there are any includes missing or explicitly declare the function tdestroy.
This is a gnu extension. What platform are you building on?
An implementation is in module/owlib/src/c/compat.c
Should be activated by HAVE_TDESTROY
I'm using gcc 4.8.2 with musl libc 1.1.4.
Thanks for the hint regarding HAVE_TDESTROY! The following patches made it work for me, though I'm not sure if they'd break glibc builds.
Thanks but that's a rather heavy-handed way of fixing it. Is there a way to set the value only for mucl libc?
I posted your question to the mucl discussion list:
Szabolcs Nagy nsz@port70.net via lists.openwall.com
2:37 PM (2 hours ago)
to musl
* Paul Alfille paul.alfille@gmail.com [2014-09-09 14:29:36 -0400]:
musl does have tdestroy
but you need -D_GNU_SOURCE to have it visible in search.h
Paul, thank you very much for your dedicated support! I'm new to musl myself and really appreciate your help.
'-D_GNU_SOURCE' works nicely, though four source files seem to overwrite the setting and therefore require modification.
The files
do set _GNU_SOURCE as well, but this doesn't cause conflicts as long as _GNU_SOURCE isn't undef'ed.
Last edit: Tiger 2014-09-11