[BusyBox] [PATCH] helps networking/libiproute/ll_types.c compile

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Tue Nov 16 12:43:34 UTC 2004


This probably needs a better clarification.

On Mon, 25 Oct 2004, Cristian Ionescu-Idbohrn wrote:

> All other files include <net/if_arp.h>, except ll_types.c.

Compilation fails for me with the origonal `#include <linux/if_arp.h>'
and uclibc 0.9.26:

,----
| In file included from ...uclibc/include/linux/byteorder/little_endian.h:11,
|                  from ...uclibc/include/asm/byteorder.h:41,
|                  from ...uclibc/include/linux/netdevice.h:34,
|                  from ...uclibc/include/linux/if_arp.h:26,
|                  from .../busybox/networking/libiproute/ll_types.c:14:
| ...uclibc/include/linux/byteorder/swab.h:160: conflicting types for `__fswab16'
| ...uclibc/include/bits/byteswap.h:25: previous declaration of `__fswab16'
| ...uclibc/include/linux/byteorder/swab.h:186: conflicting types for `__fswab32'
| ...uclibc/include/bits/byteswap.h:32: previous declaration of `__fswab32'
| make[2]: *** [.../busybox/networking/libiproute/ll_types.o] Error 1
`----

Changing to `#include <net/if_arp.h>' gives error free compilation, but
fails when built against glibc.

The attached new version of the patch produces error free compilation,
against both glibc and uclibc.


Cheers,
Cristian
-------------- next part --------------
--- ll_types.c.orig	Fri May 28 13:38:17 2004
+++ ll_types.c	Fri Nov 12 12:25:01 2004
@@ -11,7 +11,13 @@
 #include <stdio.h>
 #include <arpa/inet.h>
 
+#if defined(__UCLIBC__)
+#include <net/if_arp.h>
+#else
+#if defined(__GLIBC__)
 #include <linux/if_arp.h>
+#endif
+#endif
 
 char * ll_type_n2a(int type, char *buf, int len)
 {


More information about the busybox mailing list