[Flac-dev] Bogus autoconf test for socklen_t
Christian Weisgerber
naddy at mips.inka.de
Wed Mar 16 11:45:43 PST 2005
This affects the XMMS plugin. configure.in has this test:
AC_CHECK_TYPES(socklen_t, [], [])
And src/plugin_xmms/http.c is the only consumer:
#ifndef HAVE_SOCKLEN_T
typedef unsigned int socklen_t;
#endif
Together this looks bogus to me. The configure check looks for
socklen_t in the default headers. If it isn't found there, socklen_t
will be typedef'ed.
However, at least on FreeBSD socklen_t is defined in <sys/socket.h>,
which is not checked by AC_CHECK_TYPES() but which is included in
http.c. This can result in such errors:
http.c:48: redefinition of `socklen_t'
/usr/include/sys/socket.h:54: `socklen_t' previously declared here
--
Christian "naddy" Weisgerber naddy at mips.inka.de
More information about the Flac-dev
mailing list