]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
cuda: fix compilation
authorVictor Julien <victor@inliniac.net>
Sat, 30 Jan 2016 16:54:41 +0000 (17:54 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 25 Feb 2016 09:47:32 +0000 (10:47 +0100)
configure.ac
src/util-cuda-buffer.c
src/util-cuda-handlers.c
src/util-cuda-vars.c
src/util-cuda.c

index 087fef32f11adcdb07fae0eb60410aaed3d68703..4cf76860ccf141fa40dbc39bdd78ace258b78505 100644 (file)
                 [  --with-cuda-nvcc=DIR  cuda nvcc compiler directory],
                 [with_cuda_nvcc="$withval"],[with_cuda_nvcc=no])
 
-        AC_DEFINE([SC_CUDA_SUPPORT__],[1],(CUDA support enabled))
+        AC_DEFINE([__SC_CUDA_SUPPORT__],[1],(CUDA support enabled))
 
         if test "$with_cuda_includes" != "no"; then
             CPPFLAGS="${CPPFLAGS} -I${with_cuda_includes}"
         fi
     ])
     AM_CONDITIONAL([BUILD_CUDA], [test "x$enable_cuda" = "xyes"])
+    AM_CONDITIONAL([__SC_CUDA_SUPPORT__], [test "x$enable_cuda" = "xyes"])
 
 
   # Check for libcap-ng
index efaef9ffa9641cc78ae1ba08ee3e5e5854358c5a..47b4bc5e225885455a323cf30fb63bc59796575e 100644 (file)
@@ -45,9 +45,9 @@
  * to be reallocated to other writers.
  */
 
-#ifdef __SC_CUDA_SUPPORT__
 
 #include "suricata-common.h"
+#ifdef __SC_CUDA_SUPPORT__
 #include "suricata.h"
 
 #include "util-atomic.h"
index a6cbeec9fb526b76e97b66f67705d666eb72fc02..198c6f73b92d2d5799615f72debefa4881ab023b 100644 (file)
 
 /* compile in, only if we have a CUDA enabled device on the machine, with the
  * toolkit and the driver installed */
-#ifdef __SC_CUDA_SUPPORT__
 
 #include "suricata-common.h"
 
+#ifdef __SC_CUDA_SUPPORT__
+
 #include "util-error.h"
 #include "util-debug.h"
 #include "conf.h"
index 624c09f8511b10044287319b87baf42b322723d1..596be858266792952fe1c2358ce922ba3c244307 100644 (file)
@@ -21,8 +21,8 @@
  * \author Anoop Saldanha <anoopsaldanha@gmail.com>
  */
 
+#include "suricata-common.h"
 #ifdef __SC_CUDA_SUPPORT__
-
 #include "suricata.h"
 #include "util-mpm.h"
 #include "util-cuda-handlers.h"
index 3ada56b26c6d86d24ca3804d8a94d2330f1b72d2..1df4a2c3da587f35dfd0056796976fb275810079 100644 (file)
 
 /* compile in, only if we have a CUDA enabled device on the machine, with the
  * toolkit and the driver installed */
+
+#include "suricata-common.h"
 #ifdef __SC_CUDA_SUPPORT__
 
 #include <cuda.h>
 #include "util-cuda.h"
-#include "suricata-common.h"
-
 #include "util-error.h"
 #include "util-debug.h"
 #include "util-unittest.h"