From 459511895e48e8f0a6673bd452812e994d96a960 Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Mon, 4 Jan 2021 20:56:07 +0100 Subject: [PATCH] cap_sysctl: expose structures and variables Expose structures and variables that may be used on systems build without Casper support. --- lib/libcasper/services/cap_sysctl/cap_sysctl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libcasper/services/cap_sysctl/cap_sysctl.h b/lib/libcasper/services/cap_sysctl/cap_sysctl.h index df0fb7fd6f45..5a338d672a84 100644 --- a/lib/libcasper/services/cap_sysctl/cap_sysctl.h +++ b/lib/libcasper/services/cap_sysctl/cap_sysctl.h @@ -38,12 +38,16 @@ #include -#ifdef WITH_CASPER #define CAP_SYSCTL_READ 0x01 #define CAP_SYSCTL_WRITE 0x02 #define CAP_SYSCTL_RDWR (CAP_SYSCTL_READ | CAP_SYSCTL_WRITE) #define CAP_SYSCTL_RECURSIVE 0x04 +struct cap_sysctl_limit; +typedef struct cap_sysctl_limit cap_sysctl_limit_t; + +#ifdef WITH_CASPER + __BEGIN_DECLS int cap_sysctl(cap_channel_t *chan, const int *name, u_int namelen, void *oldp, @@ -53,9 +57,6 @@ int cap_sysctlbyname(cap_channel_t *chan, const char *name, void *oldp, int cap_sysctlnametomib(cap_channel_t *chan, const char *name, int *mibp, size_t *sizep); -struct cap_sysctl_limit; -typedef struct cap_sysctl_limit cap_sysctl_limit_t; - cap_sysctl_limit_t *cap_sysctl_limit_init(cap_channel_t *); cap_sysctl_limit_t *cap_sysctl_limit_name(cap_sysctl_limit_t *limit, const char *name, int flags);