diff --git a/ctrtool/Makefile b/ctrtool/Makefile index 55bc16b..8f07f97 100644 --- a/ctrtool/Makefile +++ b/ctrtool/Makefile @@ -5,7 +5,7 @@ OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c))) $(foreach # Compiler Settings OUTPUT = ctrtool CXXFLAGS = -I. -CFLAGS = -O2 -Wall -Wno-unused-variable -Wno-unused-result -I. -std=c99 +CFLAGS = -O2 -Wall -Wno-unused-variable -Wno-unused-result -I. -std=c11 CC = gcc CXX = g++ SYS := $(shell gcc -dumpmachine) diff --git a/ctrtool/syscalls.c b/ctrtool/syscalls.c index edf8e8c..cd37cf8 100644 --- a/ctrtool/syscalls.c +++ b/ctrtool/syscalls.c @@ -95,8 +95,8 @@ static const char *const syscall_list[NUM_SYSCALLS] = "StopDma", // 56 "GetDmaState", // 57 "RestartDma", // 58 - NULL, // 59 - NULL, // 5A + "SetGpuProt", // 59 + "SetWifiEnabled", // 5A NULL, // 5B NULL, // 5C NULL, // 5D @@ -139,7 +139,8 @@ static const char *const syscall_list[NUM_SYSCALLS] = void syscall_get_name(char *output, size_t size, unsigned int call_num) { - typedef char StaticAssert[sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS ? 1 : -1]; + _Static_assert(sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS, + "syscall table length mismatch"); if (size == 0) {