<div>When compiling with the --enable-int64 flag, the variable val.int_val is a 'long long int'. It appears the abs function on your system is defined for 'int' and 'long int'. You could probalby typecast the variable so that the compiler uses the 'long int' version. Though depending of the size of 'long int' on your system this could have an undesired effect. If 'long int' on your system is 64bits wide though you should be ok.</div>
<div> </div>
<div>You can try:</div>
<div> </div>
<div>return new Val(abs((long int)val.int_val), TYPE_COUNT);</div>
<div> </div>
<div>The other concern here is that this is a one function fix and your going to run into this issue everytime you pass a 'long long int' to a function that has defines for just 'int' and 'long int'.</div>
<div> </div>
<div>If 'long int' is 64bits wide on your system, you might be better off editing the bro header file util.h so that you redefine int64.</div>
<div> </div>
<div> </div>
<div>typedef long long int int64;</div>
<div> </div>
<div>would become</div>
<div> </div>
<div>typedef long int int64;</div>
<div> </div>
<div> </div>
<div>// Joel <br><br><br></div>
<div class="gmail_quote">On Tue, Apr 15, 2008 at 7:30 PM, Paul Schmehl <<a href="mailto:pauls@utdallas.edu">pauls@utdallas.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">--On April 15, 2008 4:02:14 PM -0700 Vern Paxson <<a href="mailto:vern@icir.org">vern@icir.org</a>> wrote:<br><br>>> That did not fix the problem.<br>><br>> Rats. Well, this doesn't repreoduce for me (w/ g++ 4.0.1), so I'm<br>
> reduced to guessing. The next thing I'd try is<br>><br>> return new Val(abs(bro_int_t(val.int_val)), TYPE_COUNT);<br>><br>> but if that doesn't work, I'm not sure what next to try.<br>><br>
> Vern<br><br></div>Sadly, that did not work either. I'm afraid I'm not a programmer, so all<br>I can do is follow your lead. For now I'll make that option is<br>non-working and continue working on the update to the port.<br>
<br>If anyone on the list has the same version of gcc and can test this and<br>find a resolution, please post it to the list. I'll include a patch in<br>the port to fix it.<br>
<div class="Ih2E3d"><br>Paul Schmehl (<a href="mailto:pauls@utdallas.edu">pauls@utdallas.edu</a>)<br>Senior Information Security Analyst<br>The University of Texas at Dallas<br><a href="http://www.utdallas.edu/ir/security/" target="_blank">http://www.utdallas.edu/ir/security/</a><br>
<br>_______________________________________________<br></div>
<div>
<div></div>
<div class="Wj3C7c">Bro mailing list<br><a href="mailto:bro@bro-ids.org">bro@bro-ids.org</a><br><a href="http://mailman.icsi.berkeley.edu/mailman/listinfo/bro" target="_blank">http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/bro</a><br>
</div></div></blockquote></div><br>