#44 AC_FUNC_MALLOC breaks builds against uClibc

open
nobody
autotools (3)
5
2011-03-09
2011-03-09
Kevin Locke
No

AC_FUNC_MALLOC redefines malloc to rpl_malloc and adds malloc to AC_LIBOBJ on systems where malloc(0) returns NULL (like uClibc - http://www.uclibc.org/downloads/Glibc_vs_uClibc_Differences.txt\). However, since iperf does not provide a malloc replacement object, this causes builds to fail with undefined symbol rpl_malloc. If the malloc(0) behavior is really required, please consider creating a replacement object (an example is available in the autoconf documentation http://www.gnu.org/software/hello/manual/autoconf/Particular-Functions.html\). If not, please consider removing AC_FUNC_MALLOC from configure.ac (likewise for AC_FUNC_MEMCMP, which doesn't affect uClibc and is now considered obsolete in the autoconf documentation).

Discussion