This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Why errors in /usr/include/linux/if.h ???
- From: Axel Freyn <axel-freyn at gmx dot de>
- To: ales88 <alessandro-panzeri at alice dot it>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 15 Jul 2011 12:19:10 +0200
- Subject: Re: Why errors in /usr/include/linux/if.h ???
- References: <32067300.post@talk.nabble.com>
Hi,
On Fri, Jul 15, 2011 at 02:55:38AM -0700, ales88 wrote:
>
> I've Ubuntu 10.10 and when I compile with gcc (version 4.4) I incur in the
> following two errors:
>
> In file included from main.c:34,
> from aodv_hello.h:30,
> from aodv_socket.c:38:
> /usr/include/linux/if.h:134: error: redefinition of âstruct ifmapâ
> /usr/include/linux/if.h:168: error: redefinition of âstruct ifreqâ
> /usr/include/linux/if.h:217: error: redefinition of âstruct ifconfâ
>
> In file included from /usr/include/iwlib.h:56,
> from llf.c:36:
> /usr/include/net/if.h:45: error: expected identifier before numeric constant
> /usr/include/net/if.h:113: error: redefinition of âstruct ifmapâ
> /usr/include/net/if.h:128: error: redefinition of âstruct ifreqâ
> /usr/include/net/if.h:178: error: redefinition of âstruct ifconfâ
>
>
> As you can observe, these two errors refer both to a SYSTEM FILE
> /usr/include/net/if.h
> Note that this error happens also when I try to compile other projects that
> inclueds the file /usr/include/net/if.h
> The problem is that I've never modified such file, therefore I don't know
> how to fix these errors.
>
> Has anybody some idea???
This error indicates that the Kernel header files you have installed do
not are the same version as those which were used when building glibc.
As both files should be under control of Ubuntu's package manager, I
would first verify that you installed the latest updates for your Ubuntu
version? If the error persists, you have to get somehow the
kernel-header-files which are compatible with the version of your
libc ... Maybe Ubuntu has an additional package therefor?
Axel