From f79964838de52f282d3c9f5116756835bd9c3952 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 4 Aug 2020 15:14:53 +0900 Subject: [PATCH] add libseccomp version to `slirp4netns --version` Signed-off-by: Akihiro Suda --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.c b/main.c index df1afd5..c79508e 100644 --- a/main.c +++ b/main.c @@ -22,6 +22,7 @@ #include #include "slirp4netns.h" #include +#include #define DEFAULT_MTU (1500) #define DEFAULT_CIDR ("10.0.2.0/24") @@ -365,12 +366,18 @@ static void usage(const char *argv0) // version output is runc-compatible and machine-parsable static void version() { + const struct scmp_version *scmpv = seccomp_version(); printf("slirp4netns version %s\n", VERSION ? VERSION : PACKAGE_VERSION); #ifdef COMMIT printf("commit: %s\n", COMMIT); #endif printf("libslirp: %s\n", slirp_version_string()); printf("SLIRP_CONFIG_VERSION_MAX: %d\n", SLIRP_CONFIG_VERSION_MAX); + if (scmpv != NULL) { + printf("libseccomp: %d.%d.%d\n", scmpv->major, scmpv->minor, + scmpv->micro); + /* Do not free scmpv */ + } } struct options {