unistd.h 709 B

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