Hi Sean,

Sorry for the delay in handling this bug report...

sean finney <[EMAIL PROTECTED]> writes:

> 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. [...]  without
> -std=c99 (or -ansi, which afaik means -std=c89), it compiles just
> fine.

That's to be expected.  When you use -ansi or -std=c99 GCC doesn't
include the same set of standard headers as when you don't, and as a
result u_int doesn't get defined.

If you want to compile with -std=c99, use -D_GNU_SOURCE to get the
full set of headers.  See "(libc) Feature Test Macros".

maui:/tmp$ cat foo.c
#include <pcap.h>
int main(){ return 0; }
maui:/tmp$ gcc -std=c99 -D_GNU_SOURCE foo.c
maui:/tmp$

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

Then u_int must be unconditionally available there.

May I close this bug?

Thanks,
-- 
Romain Francoise <[EMAIL PROTECTED]>
http://people.debian.org/~rfrancoise/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to