[ctrtool] Fix compiling on Visual Studio.

This commit is contained in:
jakcron
2017-06-06 12:58:49 +08:00
parent b53b2ce8fe
commit cbfa5398a9
+5
View File
@@ -139,8 +139,13 @@ static const char *const syscall_list[NUM_SYSCALLS] =
void syscall_get_name(char *output, size_t size, unsigned int call_num)
{
#ifdef _MSC_VER
typedef char StaticAssert[sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS ? 1 : -1];
#else
_Static_assert(sizeof(syscall_list) / sizeof(syscall_list[0]) == NUM_SYSCALLS,
"syscall table length mismatch");
#endif
if (size == 0)
{