From 9c28cd40fd4b28054c249ee57d812bb4112931ff Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 13 Sep 2012 14:52:42 +0200 Subject: [PATCH] Fix build if luajit is not available. --- src/detect-engine-content-inspection.c | 8 +++++--- src/detect-luajit.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) 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__ */