]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix build if luajit is not available.
authorEric Leblond <eric@regit.org>
Thu, 13 Sep 2012 12:52:42 +0000 (14:52 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 13 Sep 2012 12:58:48 +0000 (14:58 +0200)
src/detect-engine-content-inspection.c
src/detect-luajit.h

index f90c2e27e21df3101270279e9ba71384994f8073..d9151c7b3cf5252d346f8e0f9d84d97a4a9bfc08 100644 (file)
@@ -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
index 09669c9328af536617cdfc5f521ff5aecfa8212a..85dbc7ef6c3e224ab118977b7d42982ec8adf684 100644 (file)
@@ -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__ */