Is there anywhere I can get a complete list of the minimum version of Linux needed for each syscall? I’m looking for a general answer to questions of the form “If I use syscall X, what is the minimum version of Linux on which my code can run?”
This information can be found in the
syscalls(2) manual page. For those system calls where no kernel version is indicated, the system call appeared in kernel 1.0 or earlier.
Linus has long criticised userspace checking for particular kernel versions to know if a feature is available – the recommended approach is instead to test for the feature you want (unimplemented syscalls do return
One reason for this is that version numbers simply don’t mean as much as they seem to – distributor kernels, which most users are actually running, often have features backported from newer kernel versions. Some of them are real Frankenstein’s monsters in this respect.
You can find this when using sites such as http://linux.die.net/ near the bottoms of the pages for the API calls, in the ‘Version’ section. For example inotify was added at Linux 2.6.13.
For posix calls this wont apply because they are gathered under Posix specifications, e.g. read has a ‘Conforming’ section mentioning POSIX.1-2001.
There is a list of syscalls at the file include/asm-generic/unistd.h. You can check the history of that file at:
I’m not sure about syscalls for other arch than x86. There may be details.