ifaddrs.h header not installed

Bernhard Fischer rep.dot.nop at gmail.com
Tue Aug 5 17:30:00 UTC 2008


On Tue, Aug 05, 2008 at 06:59:30PM +0200, Yann E. MORIN wrote:
>Hello Ricard and All!

Heya Yann,
>
>On Tuesday 05 August 2008 16:57:54 Ricard Wanderlof wrote:
>> include/ifaddrs.h was not the same as libc/inet/ifaddrs.h
>[--SNIP--]
>
>Yes, I've seen that. I was suggesting to go back to the situation prior to
>r22534, when ifaddrs.h was installed, and not reverting its content.
>Sorry for the confusion...
>
>> since we
>> didn't need it outside uclibc anyway.
>
>Well, I'm not quite confortable with that: it's dependent on a config option,
>we build it, it's in the libc.so, but noone should use it?
>
>Anyway, we've got one user at least: the Java frontend from gcc-4.3.1.
>
>> 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.
>
>The whole .h file should be guarded with __UCLIBC_SUPPORT_AI_ADDRCONFIG__
>and processed through unifdef to remove its content if uClibc is not
>configured as such. Or better yet, there are a bunch of includes that get
>removed at install time. Let's add one more.

Exactly. Where was that thread again?
yep: http://uclibc.org/lists/uclibc/2008-June/019653.html

Ok with the following addition (or something to that effect):
Thanks!
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 23052)
+++ Makefile.in	(working copy)
@@ -331,6 +331,10 @@ ifneq ($(UCLIBC_HAS_CRYPT),y)
 	# Remove crypt.h since libcrypt was disabled upon request
 	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/crypt.h
 endif
+ifneq ($(UCLIBC_SUPPORT_AI_ADDRCONFIG),y)
+	# Remove bits/ifaddrs.h.h since it was disabled upon request
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)include/ifaddrs.h
+endif
 
 # Installs development library links.
 install_dev: install_headers

>Index: uClibc/libc/inet/ifaddrs.c
>===================================================================
>--- uClibc/libc/inet/ifaddrs.c	(revision 23002)
>+++ uClibc/libc/inet/ifaddrs.c	(working copy)
>@@ -22,7 +22,7 @@
> #include <alloca.h>
> #include <assert.h>
> #include <errno.h>
>-#include "ifaddrs.h"
>+#include <ifaddrs.h>
> #include <net/if.h>
> #include <netinet/in.h>
> #include <netpacket/packet.h>
>Index: uClibc/libc/inet/getaddrinfo.c
>===================================================================
>--- uClibc/libc/inet/getaddrinfo.c	(revision 23002)
>+++ uClibc/libc/inet/getaddrinfo.c	(working copy)
>@@ -68,7 +68,7 @@
> #include <sys/un.h>
> #include <sys/utsname.h>
> #include <net/if.h>
>-#include "ifaddrs.h"
>+#include <ifaddrs.h>
> 
> /* Experimentally off - libc_hidden_proto(memcpy) */
> /* Experimentally off - libc_hidden_proto(memset) */



More information about the uClibc mailing list