1 /* Set flags signalling availability of kernel features based on given 2 kernel version number. 3 Copyright (C) 2010-2021 Free Software Foundation, Inc. 4 This file is part of the GNU C Library. 5 6 The GNU C Library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public 8 License as published by the Free Software Foundation; either 9 version 2.1 of the License, or (at your option) any later version. 10 11 The GNU C Library is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with the GNU C Library. If not, see 18 <https://www.gnu.org/licenses/>. */ 19 20 #ifndef _KERNEL_FEATURES_H 21 #define _KERNEL_FEATURES_H 1 22 23 #include_next <kernel-features.h> 24 25 /* Support for statfs64 was added in 5.1. */ 26 #if __LINUX_KERNEL_VERSION < 0x050100 27 # undef __ASSUME_STATFS64 28 # define __ASSUME_STATFS64 0 29 #endif 30 31 #define __ASSUME_RECV_SYSCALL 1 32 #define __ASSUME_SEND_SYSCALL 1 33 34 /* Support for the renameat2 syscall was added in 3.17. */ 35 #if __LINUX_KERNEL_VERSION < 0x031100 36 # undef __ASSUME_RENAMEAT2 37 #endif 38 39 /* Support for the execveat syscall was added in 4.2. */ 40 #if __LINUX_KERNEL_VERSION < 0x040200 41 # undef __ASSUME_EXECVEAT 42 #endif 43 44 /* Support for copy_file_range, statx was added in kernel 4.13. */ 45 #if __LINUX_KERNEL_VERSION < 0x040D00 46 # undef __ASSUME_MLOCK2 47 # undef __ASSUME_STATX 48 #endif 49 50 /* Alpha requires old sysvipc even being a 64-bit architecture. */ 51 #undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 52 53 #endif /* _KERNEL_FEATURES_H */ 54