From: Eric Leblond Date: Thu, 13 Sep 2012 12:52:42 +0000 (+0200) Subject: Fix build if luajit is not available. X-Git-Tag: suricata-1.4beta2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c28cd40fd4b28054c249ee57d812bb4112931ff;p=thirdparty%2Fsuricata.git Fix build if luajit is not available. --- diff --git a/src/detect-engine-content-inspection.c b/src/detect-engine-content-inspection.c index f90c2e27e2..d9151c7b3c 100644 --- a/src/detect-engine-content-inspection.c +++ b/src/detect-engine-content-inspection.c @@ -41,6 +41,7 @@ #include "detect-engine-content-inspection.h" #include "detect-uricontent.h" #include "detect-urilen.h" +#include "detect-luajit.h" #include "app-layer-dcerpc.h" @@ -497,13 +498,14 @@ int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx } SCReturnInt(0); - } else if (sm->type == DETECT_LUAJIT) { +#ifdef HAVE_LUAJIT + } + else if (sm->type == DETECT_LUAJIT) { if (DetectLuajitMatchBuffer(det_ctx, s, sm, buffer, buffer_len, det_ctx->buffer_offset) != 1) { SCReturnInt(0); } - goto match; - +#endif } else { SCLogDebug("sm->type %u", sm->type); #ifdef DEBUG diff --git a/src/detect-luajit.h b/src/detect-luajit.h index 09669c9328..85dbc7ef6c 100644 --- a/src/detect-luajit.h +++ b/src/detect-luajit.h @@ -48,5 +48,6 @@ typedef struct DetectLuajitData { /* prototypes */ void DetectLuajitRegister (void); +int DetectLuajitMatchBuffer(DetectEngineThreadCtx *det_ctx, Signature *s, SigMatch *sm, uint8_t *buffer, uint32_t buffer_len, uint32_t offset); #endif /* __DETECT_FILELUAJIT_H__ */