diff options
| author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2021-01-12 18:38:10 +0000 |
|---|---|---|
| committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2021-01-12 18:40:45 +0000 |
| commit | d2ceee38ca26d8ea48b8dfd9018636eadd41fbc4 (patch) | |
| tree | 76c855d177a9354c0f5190dbe6bff8d7a36b7199 /lib | |
| parent | 6e5baec33c1032f4fbf713d601a34b4658b918a2 (diff) | |
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libcasper/libcasper/libcasper.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/lib/libcasper/libcasper/libcasper.h b/lib/libcasper/libcasper/libcasper.h index c8ed184d92cd..b55619b01506 100644 --- a/lib/libcasper/libcasper/libcasper.h +++ b/lib/libcasper/libcasper/libcasper.h @@ -123,8 +123,21 @@ cap_channel_t *cap_service_open(const cap_channel_t *chan, const char *name); int cap_service_limit(const cap_channel_t *chan, const char * const *names, size_t nnames); #else -#define cap_service_open(chan, name) (cap_init()) -#define cap_service_limit(chan, names, nnames) (0) +static inline cap_channel_t * +cap_service_open(const cap_channel_t *chan __unused, + const char *name __unused) +{ + + return (cap_init()); +} + +static inline int +cap_service_limit(const cap_channel_t *chan __unused, + const char * const *names __unused, size_t nnames __unused) +{ + + return (0); +} #endif /* @@ -229,7 +242,13 @@ int cap_sock(const cap_channel_t *chan); #ifdef WITH_CASPER int cap_limit_set(const cap_channel_t *chan, nvlist_t *limits); #else -#define cap_limit_set(chan, limits) (0) +static inline int +cap_limit_set(const cap_channel_t *chan __unused, + nvlist_t *limits __unused) +{ + + return (0); +} #endif /* |
