On Thu, 23 Feb 2017, Arnd Bergmann wrote:
Ok, so I guess we have to change the minimum kernel header version anyway to add any new syscalls, right? It looks like the only syscall that glibc uses with from post-3.2 headers is renameat2, and it only does this when __NR_renameat is not defined (implying that __NR_renameat2 must be present).
Normally we handle the case of older headers conditionally (with calls to new interfaces calling back to old syscalls if possible, which is the case for 64-bit time_t work, or returning ENOSYS errors otherwise) - just as the case of new headers but glibc supporting an older kernel at runtime needs runtime conditionals (64-bit time_t interfaces trying the new syscalls, and if they give ENOSYS errors then falling back to the old syscalls whenever possible). Although the headers version can be increased without increasing the runtime minimum, most commonly it's only increased when the runtime minimum is increased as well.