jail: fix build on platforms without seccomp support
authorDaniel Golle <daniel@makrotopia.org>
Fri, 10 Jul 2020 22:53:59 +0000 (23:53 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 10 Jul 2020 22:53:59 +0000 (23:53 +0100)
buildbots started failing due to -Werror=missing-declarations
for 'parseOCIlinuxseccomp' and 'applyOCIlinuxseccomp'.
Make sure functions were declared before defining comptibility stubs
for non-seccomp platforms.

Fixes: ea7a790 ("jail: add support for running OCI bundle")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/seccomp-oci.h

index f8e0b6acbd01fd0b117b43a106d80d6e991688f7..8cc8ae2dc30e522ccb45ec716c78553a66912792 100644 (file)
 
 #include <linux/filter.h>
 
-#ifdef SECCOMP_SUPPORT
 struct sock_fprog *parseOCIlinuxseccomp(struct blob_attr *msg);
 int applyOCIlinuxseccomp(struct sock_fprog *prog);
-#else
-
 
+#ifndef SECCOMP_SUPPORT
 struct sock_fprog *parseOCIlinuxseccomp(struct blob_attr *msg) {
        return NULL;
 }