1 /* Copyright (C) 2011-2022 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library. If not, see 16 <https://www.gnu.org/licenses/>. */ 17 18 #include <endian.h> 19 20 /* All supported kernel versions for MicroBlaze have these syscalls. */ 21 #define __ASSUME_SOCKET_SYSCALL 1 22 #define __ASSUME_BIND_SYSCALL 1 23 #define __ASSUME_CONNECT_SYSCALL 1 24 #define __ASSUME_LISTEN_SYSCALL 1 25 #define __ASSUME_GETSOCKNAME_SYSCALL 1 26 #define __ASSUME_GETPEERNAME_SYSCALL 1 27 #define __ASSUME_SOCKETPAIR_SYSCALL 1 28 #define __ASSUME_SEND_SYSCALL 1 29 #define __ASSUME_RECV_SYSCALL 1 30 #define __ASSUME_SHUTDOWN_SYSCALL 1 31 32 #include_next <kernel-features.h> 33 34 /* Support for the pselect6, preadv and pwritev syscalls was added in 35 3.15. */ 36 #if __LINUX_KERNEL_VERSION < 0x030f00 37 # undef __ASSUME_PSELECT 38 # undef __ASSUME_PREADV 39 # undef __ASSUME_PWRITEV 40 #endif 41 42 /* Support for the sendmmsg syscall was added in 3.3. */ 43 #if __LINUX_KERNEL_VERSION < 0x030300 44 # undef __ASSUME_SENDMMSG_SYSCALL 45 #endif 46 47 /* Support for the renameat2 syscall was added in 3.17. */ 48 #if __LINUX_KERNEL_VERSION < 0x031100 49 # undef __ASSUME_RENAMEAT2 50 #endif 51 52 /* Support for the execveat syscall was added in 4.0. */ 53 #if __LINUX_KERNEL_VERSION < 0x040000 54 # undef __ASSUME_EXECVEAT 55 #endif 56 57 /* Support for the mlock2 syscall was added in 4.7. */ 58 #if __LINUX_KERNEL_VERSION < 0x040700 59 # undef __ASSUME_MLOCK2 60 #endif 61 62 /* Support for statx was added in kernel 4.12. */ 63 #if __LINUX_KERNEL_VERSION < 0X040C00 64 # undef __ASSUME_STATX 65 #endif 66 67 #undef __ASSUME_CLONE_DEFAULT 68 #define __ASSUME_CLONE_BACKWARDS3 69 70 #if __BYTE_ORDER == __BIG_ENDIAN 71 # define __ASSUME_SYSVIPC_BROKEN_MODE_T 72 #endif 73 #undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 74