From: Victor Julien Date: Sat, 30 Jan 2016 16:54:41 +0000 (+0100) Subject: cuda: fix compilation X-Git-Tag: suricata-3.0.1RC1~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde7a2f656dfd8ba4a4f1aa3694ca3fc13acd05b;p=thirdparty%2Fsuricata.git cuda: fix compilation --- diff --git a/configure.ac b/configure.ac index 087fef32f1..4cf76860cc 100644 --- a/configure.ac +++ b/configure.ac @@ -1233,7 +1233,7 @@ [ --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}" @@ -1290,6 +1290,7 @@ fi ]) AM_CONDITIONAL([BUILD_CUDA], [test "x$enable_cuda" = "xyes"]) + AM_CONDITIONAL([__SC_CUDA_SUPPORT__], [test "x$enable_cuda" = "xyes"]) # Check for libcap-ng diff --git a/src/util-cuda-buffer.c b/src/util-cuda-buffer.c index efaef9ffa9..47b4bc5e22 100644 --- a/src/util-cuda-buffer.c +++ b/src/util-cuda-buffer.c @@ -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" diff --git a/src/util-cuda-handlers.c b/src/util-cuda-handlers.c index a6cbeec9fb..198c6f73b9 100644 --- a/src/util-cuda-handlers.c +++ b/src/util-cuda-handlers.c @@ -23,10 +23,11 @@ /* 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" diff --git a/src/util-cuda-vars.c b/src/util-cuda-vars.c index 624c09f851..596be85826 100644 --- a/src/util-cuda-vars.c +++ b/src/util-cuda-vars.c @@ -21,8 +21,8 @@ * \author Anoop Saldanha */ +#include "suricata-common.h" #ifdef __SC_CUDA_SUPPORT__ - #include "suricata.h" #include "util-mpm.h" #include "util-cuda-handlers.h" diff --git a/src/util-cuda.c b/src/util-cuda.c index 3ada56b26c..1df4a2c3da 100644 --- a/src/util-cuda.c +++ b/src/util-cuda.c @@ -25,12 +25,12 @@ /* 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 #include "util-cuda.h" -#include "suricata-common.h" - #include "util-error.h" #include "util-debug.h" #include "util-unittest.h"