Donate Share

Network Security Analysis Tool

Tracker: Bugs

5 Make breaks on FreeBSD 4.7 - ID: 709592
Last Update: Tracker Item Submitted ( athulin )

FreeBSD 4.7 -- straight configuration: make breaks:

1. src/pidalloc.cpp needs '#include <pthread.h>'

2. src/mod/xp_pcap_interface.c:136: assignment to
'unsigned char *' from 'char *' changes signedness.

pcap_next() returns u_char * on FreeBSD (which
translates to 'const unsigned char *'). Changing the
(char *) cast to (unsigned char *) fixed it, but
there's something fundamentally wrong about dropping
const in that way in C++. (I suspect those DARWIN
defines may have something to do with this, as well...)

After that compiling worked, but linking failed.

Linking is done -lpthread, which doesn't exist (pthread
is in libc_r). On FreeBSD (at least) the thing should
be '-pthread' (no l) instead -- it's a special gcc-hack
to use libc_r instead of libc. Edited the makefile to
fix this.

(-O6 did not produce any complaints, but it's not
documented to work. I've never seen anyone do more than
-O2 on a FreeBSD system. Changed this as well, just to
be on the safe side.)

After that, make and installation went OK. Looks like
it runs OK as well.



Anders Thulin ( athulin ) - 2003-03-25 19:06

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.