Allow overriding HAVE_LANDLOCK irrespectible of kernel verison
This commit is contained in:
parent
67e1afc904
commit
edf144bbc7
8
qssb.h
8
qssb.h
@ -36,14 +36,20 @@
|
|||||||
#include <linux/limits.h>
|
#include <linux/limits.h>
|
||||||
#include <linux/filter.h>
|
#include <linux/filter.h>
|
||||||
#include <linux/seccomp.h>
|
#include <linux/seccomp.h>
|
||||||
|
#include <linux/version.h>
|
||||||
#include <sys/capability.h>
|
#include <sys/capability.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
|
#ifndef HAVE_LANDLOCK
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,13,0)
|
||||||
|
/* TODO: Hopefully a fair assumption. But we need to runtime checks */
|
||||||
|
#define HAVE_LANDLOCK = 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if HAVE_LANDLOCK == 1
|
||||||
#include <linux/landlock.h>
|
#include <linux/landlock.h>
|
||||||
#define HAVE_LANDLOCK 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//TODO: stolen from kernel samples/seccomp, GPLv2...?
|
//TODO: stolen from kernel samples/seccomp, GPLv2...?
|
||||||
|
Loading…
Reference in New Issue
Block a user