kernel-features.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Set flags signalling availability of kernel features based on given
  2. kernel version number.
  3. Copyright (C) 2008-2019 Free Software Foundation, Inc.
  4. This file is part of the GNU C Library.
  5. The GNU C Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  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. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library. If not, see
  15. <http://www.gnu.org/licenses/>. */
  16. /* Direct socketcalls available with kernel 4.3. */
  17. #if __LINUX_KERNEL_VERSION >= 0x040300
  18. # define __ASSUME_SOCKET_SYSCALL 1
  19. # define __ASSUME_SOCKETPAIR_SYSCALL 1
  20. # define __ASSUME_BIND_SYSCALL 1
  21. # define __ASSUME_LISTEN_SYSCALL 1
  22. # define __ASSUME_GETSOCKOPT_SYSCALL 1
  23. # define __ASSUME_SETSOCKOPT_SYSCALL 1
  24. # define __ASSUME_GETSOCKNAME_SYSCALL 1
  25. # define __ASSUME_GETPEERNAME_SYSCALL 1
  26. # define __ASSUME_SHUTDOWN_SYSCALL 1
  27. #endif
  28. #include_next <kernel-features.h>
  29. #undef __ASSUME_ACCEPT_SYSCALL
  30. #if __LINUX_KERNEL_VERSION < 0x040300
  31. # undef __ASSUME_ACCEPT4_SYSCALL
  32. # undef __ASSUME_RECVMMSG_SYSCALL
  33. # undef __ASSUME_SENDMMSG_SYSCALL
  34. # undef __ASSUME_SENDMSG_SYSCALL
  35. # undef __ASSUME_RECVMSG_SYSCALL
  36. # undef __ASSUME_CONNECT_SYSCALL
  37. # undef __ASSUME_RECVFROM_SYSCALL
  38. # undef __ASSUME_SENDTO_SYSCALL
  39. #endif
  40. /* No support for PI futexes or robust mutexes before 3.10 for m68k. */
  41. #if __LINUX_KERNEL_VERSION < 0x030a00
  42. # undef __ASSUME_SET_ROBUST_LIST
  43. #endif
  44. /* m68k only supports ipc syscall. */
  45. #undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS