While trying to get Alexey Kuznetsov's iproute program to compile I
found that the kernel version of if.h and if_arp.h seem to be really
broken. I wrote a small program which may look familiar to see of this
was the case. I am running redhat2.1 with kernel 2.1.117 (and observed
same problem with 2.1.122). The test program is below and some of the
output is included, I had to cut some of it, but the most serious
errors are at the end. Alexey says that he uses libc5 rather than
glibc which comes with redhat2.x which is not helping me too much.
I have spent some time with this and am really stuck here does anyone have
any clues?
Please CC me on any reply as I'm not on the regular list.
Regards
Duncan
------------------------- test.c ----------------------------------
#include <net/if.h>
#include </usr/src/linux-2.1.117/include/linux/if_arp.h>
void main(){
printf("\nHello World\n");
}
------------------------ cc output ---------------------------------------
In file included from /usr/include/linux/netdevice.h:28,
from /usr/src/linux-2.1.117/include/linux/if_arp.h:25,
from test.c:3:
/usr/include/linux/if.h:56: redefinition of `struct ifaddr'
/usr/include/linux/if.h:81: redefinition of `struct ifmap'
/usr/include/linux/if.h:99: redefinition of `struct ifreq'
/usr/include/linux/if.h:118: parse error before `__kernel_caddr_t'
/usr/include/linux/if.h:118: warning: no semicolon at end of struct or union
/usr/include/linux/if.h:118: warning: no semicolon at end of struct or union
/usr/include/linux/if.h:119: warning: data definition has no type or storage
class
/usr/include/linux/if.h:120: parse error before `}'
/usr/include/linux/if.h:146: redefinition of `struct ifconf'
/usr/include/linux/if.h:150: parse error before `__kernel_caddr_t'
/usr/include/linux/if.h:150: warning: no semicolon at end of struct or union
/usr/include/linux/if.h:150: warning: no semicolon at end of struct or union
/usr/include/linux/if.h:152: parse error before `}'
/usr/include/linux/if.h:152: warning: data definition has no type or storage
class
/usr/include/linux/if.h:153: parse error before `}'
In file included from /usr/src/linux-2.1.117/include/linux/if_arp.h:25,
from test.c:3:
/usr/include/linux/netdevice.h:79: parse error before `__u8'
/usr/include/linux/netdevice.h:79: warning: no semicolon at end of struct or
union
/usr/include/linux/netdevice.h:83: parse error before `}'
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/