Skip to content

Commit 9339c86

Browse files
ratapcmoore
authored andcommitted
all: fix SCMP_FLTATR_CTL_SSB with old libseccomp
As commit "golang: Add support for SCMP_FLTATR_CTL_SSB" (276b0ea) says, that was added in libseccomp 2.5.0. However, the elif clause added there meant that if we are using a libseccomp < 2.4 the define will not be done. This was not an issue because we weren't testing with such an old libseccomp, but now we will test against < 2.4 libseccomp in future patches. This patch just fixes it by using different if clause for the different defines, instead of elif. Signed-off-by: Rodrigo Campos <[email protected]> Acked-by: Tom Hromatka <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent febb5ff commit 9339c86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

seccomp_internal.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ const uint32_t C_ACT_ALLOW = SCMP_ACT_ALLOW;
104104
#if (SCMP_VER_MAJOR < 2) || \
105105
(SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 4)
106106
#define SCMP_FLTATR_CTL_LOG _SCMP_FLTATR_MIN
107-
#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5
107+
#endif
108+
#if SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5
108109
#define SCMP_FLTATR_CTL_SSB _SCMP_FLTATR_MIN
109110
#endif
110111

0 commit comments

Comments
 (0)