argus-3.0.0.rc.1 FreeBSD compile problems

Carter Bullard carter at qosient.com
Wed Jun 7 15:26:43 EDT 2006


OK, so I'm now making mistakes on the mistakes!!!!!!!!!

The correct answer is "EXTRACT_64BITS".  I'm making the
mistake of creating the patches on my Mac OS X machine
which is of course big endian, which is not the right kind of machine
to do little_endian related code work, and to boot, I'm looking
at an older version of code to try to find the macro, so
really stupid.   The best thing to do is ignore my suggestions,
and just see what the compiler barfs on ;o)

Very sorry for the inconvenience, and I think that this is right now !!


On Jun 7, 2006, at 3:12 PM, Carter Bullard wrote:

> Oooooops, its "EXTRACT_64BIT".
> Not my day, sorry.
> Carter
>
> On Jun 7, 2006, at 2:13 PM, Carter Bullard wrote:
>
>> Ooooops, that should be "EXTRACT_64BITS".
>> Carter
>>
>> On Jun 7, 2006, at 2:11 PM, Carter Bullard wrote:
>>
>>> Hey Robin,
>>> So, FreeBSD doesn't have byteswap.h nor does it support bswap_64?
>>> Hmmm, disappointing.   So try this just to see if we can get it  
>>> to compile.
>>> You'll have to make this type of patch to the clients as well.
>>>
>>> Apply this patch to argus_util.c
>>> *** ./argus_util.c   2006-06-07 14:26:49.000000000 -0400
>>> --- ./argus_util.c    2006-06-07 14:25:43.000000000 -0400
>>> ***************
>>> *** 129,134 ****
>>> --- 129,144 ----
>>>   void ArgusPrintHex (const u_char *, u_int);
>>>
>>>   #if defined(_LITTLE_ENDIAN)
>>> + #if defined(__FreeBSD__)
>>> + #include <extract.h>
>>> + #if !defined(ntohll)
>>> + #define ntohll(x) EXTRACT_64(&x)
>>> + #define htonll(x) EXTRACT_64(&x)
>>> + #else
>>> + #define ntohll(x) x
>>> + #define htonll(x) x
>>> + #endif
>>> + #else
>>>   #include <byteswap.h>
>>>   #if !defined(ntohll)
>>>   #define ntohll(x) bswap_64(x)
>>> ***************
>>> *** 138,143 ****
>>> --- 148,154 ----
>>>   #define htonll(x) x
>>>   #endif
>>>   #endif
>>> + #endif
>>>
>>>   void ArgusNtoH (struct ArgusRecord *);
>>>   void ArgusHtoN (struct ArgusRecord *);
>>>
>>> Carter
>>>
>>>




More information about the argus mailing list