I need to translate Linux syscall number into human-readable name. With kernel 2.6.32, I was extracting the names from _NR* macros in /usr/include/asm/unistd_32.h, which was hacky but it worked. Now I need to make it work on kernel 3.2.0 and this file is no longer there.
What is the least hacky and most portable way of mapping the Linux syscall number into human-readable name? E.g. 1->exit, 6->close etc.