nk/privs: Make capabilities conditional on __linux__ define.

This commit is contained in:
Nicholas J. Kain 2022-03-08 23:35:12 -05:00
parent 9998790488
commit cd859ce8c3
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ NDHC_OBJS = $(NDHC_SRCS:.c=.o)
NDHC_DEP = $(NDHC_SRCS:.c=.d)
INCL = -I.
CFLAGS = -MMD -O2 -s -std=gnu99 -pedantic -Wall -Wextra -Wimplicit-fallthrough=0 -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wmissing-prototypes -Wunused-const-variable=0 -Wcast-qual -Wsign-conversion -D_GNU_SOURCE -DNK_USE_CAPABILITY -Wno-discarded-qualifiers
CFLAGS = -MMD -O2 -s -std=gnu99 -pedantic -Wall -Wextra -Wimplicit-fallthrough=0 -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wmissing-prototypes -Wunused-const-variable=0 -Wcast-qual -Wsign-conversion -D_GNU_SOURCE -Wno-discarded-qualifiers
CPPFLAGS += $(INCL)
all: ragel ndhc

View File

@ -29,7 +29,7 @@ void nk_set_chroot(const char *chroot_dir)
suicide("%s: chdir('/') failed: %s", __func__, strerror(errno));
}
#ifdef NK_USE_CAPABILITY
#ifdef __linux__
static size_t nk_get_capability_vinfo(uint32_t *version)
{
struct __user_cap_header_struct hdr;