Package: libpcap0.8-dev
Version: 0.9.8-3
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi there,

i was helping a friend earlier tonight with an application he had
written under freebsd, using libpcap.  it compiled without errors on his
system, using fairly strict flags including -ansi.  however, on linux
(debian and others) it FTBFS.

consider the following example code:

#include <pcap.h>
int main(){ return 0; }

rangda[/home/sean] gcc -std=c99 foo.c                                        :)
In file included from /usr/include/pcap.h:51,
                 from foo.c:1:
/usr/include/pcap-bpf.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘bpf_u_int32’
/usr/include/pcap-bpf.h:90: error: expected specifier-qualifier-list before 
‘u_int’
/usr/include/pcap-bpf.h:106: error: expected specifier-qualifier-list before 
‘u_short’
/usr/include/pcap-bpf.h:805: error: expected specifier-qualifier-list before 
‘u_short’
/usr/include/pcap-bpf.h:819: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘bpf_filter’
In file included from foo.c:1:
/usr/include/pcap.h:114: error: expected specifier-qualifier-list before 
‘bpf_u_int32’
/usr/include/pcap.h:143: error: expected specifier-qualifier-list before 
‘bpf_u_int32’
/usr/include/pcap.h:151: error: expected specifier-qualifier-list before ‘u_int’
/usr/include/pcap.h:200: error: expected specifier-qualifier-list before 
‘bpf_u_int32’
/usr/include/pcap.h:216: error: expected ‘)’ before ‘*’ token
/usr/include/pcap.h:220: error: expected declaration specifiers or ‘...’ before 
‘bpf_u_int32’
/usr/include/pcap.h:220: error: expected declaration specifiers or ‘...’ before 
‘bpf_u_int32’
/usr/include/pcap.h:226: error: expected declaration specifiers or ‘...’ before 
‘pcap_handler’
/usr/include/pcap.h:226: error: expected declaration specifiers or ‘...’ before 
‘u_char’
/usr/include/pcap.h:227: error: expected declaration specifiers or ‘...’ before 
‘pcap_handler’
/usr/include/pcap.h:227: error: expected declaration specifiers or ‘...’ before 
‘u_char’
/usr/include/pcap.h:228: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
/usr/include/pcap.h:230: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/include/pcap.h:239: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/include/pcap.h:243: error: expected declaration specifiers or ‘...’ before 
‘bpf_u_int32’
/usr/include/pcap.h:245: error: expected declaration specifiers or ‘...’ before 
‘bpf_u_int32’
/usr/include/pcap.h:268: error: expected ‘)’ before ‘*’ token
/usr/include/pcap.h:276: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘bpf_filter’
rangda[/home/sean]                                                       [1] :(

without -std=c99 (or -ansi, which afaik means -std=c89), it compiles just fine.

the strange thing is that with these flags it compiles just fine under freebsd.

        sean

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libpcap0.8-dev depends on:
ii  libc6-dev                     2.7-10     GNU C Library: Development Librari
ii  libpcap0.8                    0.9.8-3    system interface for user-level pa

libpcap0.8-dev recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH9ViwynjLPm522B0RAoXsAJ9OtEpMpAiwOAj8ARc98a5A3ecjDQCfV/L3
pHNPpQGRW66L080GXmnAm8w=
=35fz
-----END PGP SIGNATURE-----


Reply via email to