unistd.h 633 B

123456789101112131415161718192021222324
  1. #include <uapi/asm-generic/unistd.h>
  2. #include <linux/export.h>
  3. /*
  4. * These are required system calls, we should
  5. * invert the logic eventually and let them
  6. * be selected by default.
  7. */
  8. #if __BITS_PER_LONG == 32
  9. #define __ARCH_WANT_STAT64
  10. #define __ARCH_WANT_SYS_LLSEEK
  11. #endif
  12. /*
  13. * "Conditional" syscalls
  14. *
  15. * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  16. * but it doesn't work on all toolchains, so we just do it by hand
  17. */
  18. #ifndef cond_syscall
  19. #define cond_syscall(x) asm(".weak\t" VMLINUX_SYMBOL_STR(x) "\n\t" \
  20. ".set\t" VMLINUX_SYMBOL_STR(x) "," \
  21. VMLINUX_SYMBOL_STR(sys_ni_syscall))
  22. #endif