diff --git a/src/alert-unified-alert.c b/src/alert-unified-alert.c index 6fb9888805..4d3a792815 100644 --- a/src/alert-unified-alert.c +++ b/src/alert-unified-alert.c @@ -87,8 +87,8 @@ typedef struct AlertUnifiedAlertPacketHeader_ { struct timeval ref_ts; /* Reference timestamp. */ struct timeval ts; /* Timestamp. */ #else - struct sc_timeval32 ref_ts; /* Reference timestamp. */ - struct sc_timeval32 ts; /* Timestamp. */ + SCTimeval32 ref_ts; /* Reference timestamp. */ + SCTimeval32 ts; /* Timestamp. */ #endif /* UNIFIED_NATIVE_TIMEVAL */ uint32_t src_ip; uint32_t dst_ip; diff --git a/src/alert-unified-log.c b/src/alert-unified-log.c index a7ef6ed4a6..e0451340b6 100644 --- a/src/alert-unified-log.c +++ b/src/alert-unified-log.c @@ -56,6 +56,12 @@ void TmModuleAlertUnifiedLogRegister (void) { tmm_modules[TMM_ALERTUNIFIEDLOG].RegisterTests = AlertUnifiedLogRegisterTests; OutputRegisterModule(MODULE_NAME, "unified-log", AlertUnifiedLogInitCtx); + +#if __WORDSIZE == 64 + SCLogInfo("The Unified1 module detected a 64-bit system. For Barnyard " + "0.2.0 to work correctly, it needs to be patched. Patch can be " + "found here: https://redmine.openinfosecfoundation.org/attachments/download/184/barnyard.64bit.diff"); +#endif } typedef struct AlertUnifiedLogThread_ { @@ -89,7 +95,7 @@ typedef struct AlertUnifiedLogPacketHeader_ { #ifdef UNIFIED_NATIVE_TIMEVAL struct timeval ref_tv; #else - struct sc_timeval32 ref_tv; + SCTimeval32 ref_tv; #endif /* UNIFIED_NATIVE_TIMEVAL */ /* 32 bit unsigned flags */ @@ -99,7 +105,7 @@ typedef struct AlertUnifiedLogPacketHeader_ { #ifdef UNIFIED_NATIVE_TIMEVAL struct timeval tv; #else - struct sc_timeval32 tv; + SCTimeval32 tv; #endif /* UNIFIED_NATIVE_TIMEVAL */ uint32_t caplen; uint32_t pktlen; diff --git a/src/util-time.h b/src/util-time.h index 664bc70e82..de9fb93eed 100644 --- a/src/util-time.h +++ b/src/util-time.h @@ -6,10 +6,10 @@ * * Used by the unified on disk file format. */ -struct sc_timeval32 { +typedef struct SCTimeval32_ { uint32_t tv_sec; uint32_t tv_usec; -}; +} SCTimeval32; void TimeSet(struct timeval *); void TimeGet(struct timeval *);