[Flac-dev] Bogus autoconf test for socklen_t

Josh Coalson xflac at yahoo.com
Thu Sep 1 22:04:50 PDT 2005


ok, hackily fixed in CVS for FreeBSD, thanks.

AC_CHECK_TYPES is not too wieldy if you want to stray from
the default includes unfortunately.

Josh


--- Christian Weisgerber <naddy at mips.inka.de> wrote:

> 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
> _______________________________________________
> Flac-dev mailing list
> Flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail


More information about the Flac-dev mailing list