Upon examining the ip_tunnel.c file, I found the following:
#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
I am using Glibc-2.4, thus net/if.h and net/if_arp.h are being included. Within net/if.h, the structures for ifmap, ifreq, and ifconf are defined.
These structures are also defined in linux/if.h, which is not included directly, however it is included by linux/if_tunnel.h.
Apparently ip_tunnel.c requires certain definitions within linux/if_tunnel.h. Thus it seems to me that I am left with two choices, neither of which is probably correct:
1. Comment out the #include <linux/if.h> statement from within linux/if_tunnel.h
2. Add a preprocessor statement similar to that shown above to block linux/if.h from being included within linux/if_tunnel.h when dealing with versions of Glibc-2.1 or greater.
I will choose option 1 since it appears that linux/if_tunnel.h is not dependent on anything defined in linux/if.h, and thus should not include it.
Seriously though, can somebody advise me as why this issue exists and if there is a better workaround.
P.S. After a quick fix, I found another issue with a redefinition of struct iphdr. I commented out linux/ip.h from being included within linux/if_tunnel.h, however this solution is flawed because there is a dependency for struct iphdr in linux/if_tunnel.h.