Skip to content

Commit

Permalink
[ctrtool] Fix compiling on Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakcron committed Jun 6, 2017
1 parent b53b2ce commit cbfa539
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ctrtool/syscalls.c
Expand Up @@ -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)
{
Expand Down

0 comments on commit cbfa539

Please sign in to comment.