Make it possible to compile with clang
This commit is contained in:
parent
466f49e16d
commit
114ce7e976
5
Makefile
5
Makefile
@ -17,13 +17,12 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
CC ?= gcc
|
||||
CFLAGS += -O2 -g -ggdb -c -std=c11 \
|
||||
-D_GNU_SOURCE \
|
||||
-fstack-protector-all -Wformat -Wformat=2 -Wformat-security -fPIE -Wa,--noexecstack \
|
||||
-Wall -Wextra -Werror
|
||||
|
||||
LD = gcc
|
||||
LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
|
||||
|
||||
SRCS = nsjail.c cmdline.c contain.c log.c net.c subproc.c sandbox.c util.c seccomp/bpf-helper.c
|
||||
@ -36,7 +35,7 @@ BIN = nsjail
|
||||
all: $(BIN)
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
$(LD) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
$(CC) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
$(RM) core Makefile.bak $(OBJS) $(BIN)
|
||||
|
@ -156,7 +156,7 @@ bool containDropPrivs(struct nsjconf_t * nsjconf)
|
||||
.version = _LINUX_CAPABILITY_VERSION_3,
|
||||
.pid = 0,
|
||||
};
|
||||
const struct __user_cap_data_struct const cap_data[_LINUX_CAPABILITY_U32S_3] = {
|
||||
const struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3] = {
|
||||
[0 ... (_LINUX_CAPABILITY_U32S_3 - 1)].inheritable = 0U,
|
||||
[0 ... (_LINUX_CAPABILITY_U32S_3 - 1)].effective = 0U,
|
||||
[0 ... (_LINUX_CAPABILITY_U32S_3 - 1)].permitted = 0U,
|
||||
|
Loading…
Reference in New Issue
Block a user