On Tue, 5 Aug 2008, Yann E. MORIN wrote: > I'm using uClibc 20080801, and I did set UCLIBC_SUPPORT_AI_ADDRCONFIG=y > in my uClibc config file, thus getifaddrs get compiled in uClibc.so. > > To check if it can use getifaddrs et al., the Java configure tries to link > a program that calls getifaddrs, but does not include ifaddrs.h, it just > defines a prototype on its own. Because getifaddrs does in fact exist in > uClibc.so, the link is successfull, and configure #defines HAVE_GETIFADDRS > to 1. The calls to getifaddrs and freeifaddrs are then guarded with > ... > But when Java gets built, it fails with: > ... > Before r22534, there was a include/ifaddrs.h file. At 22534 this file was > moved to libc/inet/ifaddrs.h as it was supposed to be a private header: > ... > But that is not true in fact. As for glibc, it does install this header. > > ... > > Can we revert 22534, or is there a better way?
include/ifaddrs.h was not the same as libc/inet/ifaddrs.h ; the former included the latter and thus could not be included outside uclibc. The files were taken from glibc; rather than try and figure out the necessary infrastructure to get it working, we moved the contents of include/ifaddrs.h to libc/inet/ifaddrs.h and removed the former, since we didn't need it outside uclibc anyway. However, I can't see a problem with making it globally accessible, so the change you propose > So I moved ifaddrs.h back to the include/ directory, also changed back > libc/inet/ifaddrs.c and libc/inet/getaddrinfo.c to #include <ifaddrs.h> > (instead of "ifaddrs.h"), and the build completes. should be ok. Check that the whole shebang builds properly if UCLIBC_SUPPORT_AI_ADDRCONFIG is not defined. Also, technically it's not reverting 22534 as the files looked different then. Then again, someone else may have another view. Seems a bit odd of a configuration script to define its own prototype and try to link, rather than just trying to see if the requested function could be found in an include file, but I guess there's a good reason for doing so. /Ricard -- Ricard Wolf Wanderlöf ricardw(at)axis.com Axis Communications AB, Lund, Sweden www.axis.com Phone +46 46 272 2016 Fax +46 46 13 61 30 _______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc