[#5715] libpcap fails to compile in trunk

Document created by Aaronwu Employee on Sep 5, 2013
Version 1Show Document
  • View in full screen mode

[#5715] libpcap fails to compile in trunk

Submitted By: Peter Meerwald

Open Date

2009-11-22 18:07:07     Close Date

2010-06-11 04:54:33

Priority:

Medium     Assignee:

Barry Song

Status:

Closed     Fixed In Release:

N/A

Found In Release:

snaps     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

09r1

App binary format:

N/A     

Summary: libpcap fails to compile in trunk

Details:

 

bfin-linux-uclibc-gcc -O2 -fPIC -pipe -Wall -g -O2      -mcpu=bf536-0.3 -I. -I/scratch/et908a-uclinux-dist/lib/libpcap/libpcap-1.0.0 -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c /scratch/et908a-uclinux-dist/lib/libpcap/libpcap-1.0.0/pcap-linux.c

In file included from /opt/uClinux-09r1-10/bfin-linux-uclibc/bin/../bfin-linux-uclibc/runtime/usr/include/linux/wireless.h:74,

                 from /scratch/et908a-uclinux-dist/lib/libpcap/libpcap-1.0.0/pcap-linux.c:106:

/opt/uClinux-09r1-10/bfin-linux-uclibc/bin/../bfin-linux-uclibc/runtime/usr/include/linux/if.h:124: error: redefinition of ‘struct ifmap’

/opt/uClinux-09r1-10/bfin-linux-uclibc/bin/../bfin-linux-uclibc/runtime/usr/include/linux/if.h:160: error: redefinition of ‘struct ifreq’

/opt/uClinux-09r1-10/bfin-linux-uclibc/bin/../bfin-linux-uclibc/runtime/usr/include/linux/if.h:210: error: redefinition of ‘struct ifconf’

make[3]: *** [pcap-linux.o] Error 1

make[3]: Leaving directory `/scratch/et908a-uclinux-dist/lib/libpcap/build-libpcap-1.0.0'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/scratch/et908a-uclinux-dist/lib/libpcap'

make[1]: *** [libpcap_only] Error 2

make[1]: Leaving directory `/scratch/et908a-uclinux-dist/lib'

make: *** [lib/libpcap_only] Error 2

 

Follow-ups

 

--- Barry Song                                               2010-01-06 23:48:28

Yes. pcap-linux.c include:

 

#include <net/if.h>

 

/*

* Got Wireless Extensions?

*/

#ifdef HAVE_LINUX_WIRELESS_H

#include <linux/wireless.h>

#endif

 

But wireless.h includes:

#include <linux/if.h>                   /* for IFNAMSIZ and co... */

 

ifmap and so on is defined in both net/if.h and linux/if.h. That makes the

problem.

 

--- Barry Song                                               2010-01-07 03:30:23

Upstream has fixed this bug in:

http://github.com/mcr/libpcap/commit/080c13423a8f37f7b5e0964b6ff1cee2d1d83e0e

http://github.com/mcr/libpcap/commit/ba23aa7b427886224e78408cb1cf48b1cdbe50cc

For us, we simply use linux/if.h to replace net/if.h.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes