Errors compiling bro-pub-0.8a32 on Linux 2.4.20-8
Yann Berthier
yb at sainte-barbe.org
Sat Jul 12 12:26:13 PDT 2003
On Sat, 12 Jul 2003, Christopher Jay Manders wrote:
>
> I fixed this by adding:
>
> #include <elf.h>
>
> to the top of util.cc, since that is where uint32_t is defined on my
> Linux....
>
> That solved that problem. Then another cropped up in Dict.cc:
>
> g++ -I. -Ilibedit -O -Ilinux-include -c Dict.cc
> Dict.cc: In member function `void* Dictionary::NextEntry(HashKey*&,
> IterCookie*&, int) const':
> Dict.cc:260: choosing `HashKey::HashKey(const void*, int, unsigned int)'
> over `
> HashKey::HashKey(void*, int, int)'
> Dict.cc:260: because worst conversion for the former is better than worst
> conversion for the latter
> Dict.cc:288: choosing `HashKey::HashKey(const void*, int, unsigned int)'
> over `
> HashKey::HashKey(void*, int, int)'
> Dict.cc:288: because worst conversion for the former is better than worst
> conversion for the latter
> make: *** [Dict.o] Error 1
>
>
> This error looks more programatic to fix, so this will take more time.
> Anyone with thoughts on this one?
Well, i fixed it by doing exactly what the compiler suggests:
--- work/bro-pub-0.8a32/Dict.cc Wed Apr 9 08:57:01 2003
+++ /tmp/bro-pub-0.8a32/Dict.cc Thu Jun 26 14:37:51 2003
@@ -257,7 +257,7 @@
entry = (*ttbl[b])[o];
++cookie->offset;
if ( return_hash )
- h = new HashKey(entry->key, entry->len, entry->hash);
+ h = new HashKey((const void *)entry->key, entry->len, (unsigned int) entry->hash);
return entry->value;
}
@@ -285,7 +285,7 @@
entry = (*ttbl[b])[0];
if ( return_hash )
- h = new HashKey(entry->key, entry->len, entry->hash);
+ h = new HashKey((const void *) entry->key, entry->len, (unsigned int) entry->hash);
cookie->bucket = b;
cookie->offset = 1;
I have not tried to see if this is programaticaly correct, but with
it bro compiles and runs fine for me (FreeBSD 5.1-CURRENT).
- yann
More information about the Bro
mailing list