ifaddrs.h header not installed
Yann E. MORIN
yann.morin.1998 at anciens.enib.fr
Tue Aug 5 08:10:57 UTC 2008
Hello All!
I'm trying to build a gcc-4.3.1 basezd compiler with support for Java.
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
#ifdef HAVE_GETIFADDRS
...
#else
...
#endif
But when Java gets built, it fails with:
java/net/natVMNetworkInterface.cc: In static member function 'static java::util::Vector* java::net::VMNetworkInterface::getInterfaces()':
java/net/natVMNetworkInterface.cc:57: error: '::getifaddrs' has not been declared
java/net/natVMNetworkInterface.cc:60: error: invalid use of incomplete type 'struct ifaddrs'
java/net/natVMNetworkInterface.cc:56: error: forward declaration of 'struct ifaddrs'
[--SNIP similar errors--]
java/net/natVMNetworkInterface.cc:97: error: 'freeifaddrs' was not declared in this scope
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:
$ svn log -v -r 22534 svn://uclibc.org/trunk/uClibc
------------------------------------------------------------------------
r22534 | ricardw | 2008-06-27 17:38:41 +0200 (Fri, 27 Jun 2008) | 2 lines
Changed paths:
D /trunk/uClibc/include/ifaddrs.h
M /trunk/uClibc/libc/inet/getaddrinfo.c
M /trunk/uClibc/libc/inet/ifaddrs.h
Removed include/ifaddrs.h and put contents in libc/inet/ifaddrs.h, as we do not
need the file outside of uClibc anyway.
------------------------------------------------------------------------
But that is not true in fact. As for glibc, it does install this header.
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.
Can we revert 22534, or is there a better way?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ |
| --==< °_° >==-- °------------.-------: X AGAINST | /e\ There is no |
| http://ymorin.is-a-geek.org/ | * _ * | / \ HTML MAIL | """ conspiracy. |
°------------------------------°-------°------------------°--------------------°
More information about the uClibc
mailing list