aboutsummaryrefslogtreecommitdiff
path: root/src/pseccomp.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-21 22:30:06 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-21 22:30:06 +0200
commit4de442d472f33c1e6012a96c94069ef2923ea716 (patch)
tree9476b2f916467d8ae6b637ae31e8e88c76529ab4 /src/pseccomp.c
parent15dccd91c589cd3f376650759b42319f0f712205 (diff)
POTD skeleton #72.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/pseccomp.c')
-rw-r--r--src/pseccomp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pseccomp.c b/src/pseccomp.c
index c794fdb..e991d46 100644
--- a/src/pseccomp.c
+++ b/src/pseccomp.c
@@ -1,6 +1,12 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <sys/prctl.h>
-#include <valgrind/valgrind.h>
+#ifdef HAVE_VALGRIND
+#include <valgrind.h>
+#endif
#include "pseccomp.h"
#include "log.h"
@@ -75,10 +81,12 @@ static const int jail_allowed_syscalls[] = {
static int pseccomp_using_valgrind(void)
{
+#ifdef HAVE_VALGRIND
if (RUNNING_ON_VALGRIND) {
W("%s", "SECCOMP: running on valgrind, disabled");
return 1;
}
+#endif
return 0;
}