rt_stubs.c 734 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * system call not available stub
  3. * based on libc's stubs.c
  4. *
  5. * Copyright (C) 2009 Analog Devices Inc.
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include <errno.h>
  10. #include <sys/syscall.h>
  11. #ifdef __UCLIBC_HAS_STUBS__
  12. static int rt_enosys_stub(void)
  13. {
  14. __set_errno(ENOSYS);
  15. return -1;
  16. }
  17. #define make_stub(stub) \
  18. link_warning(stub, #stub ": this function is not implemented") \
  19. strong_alias(rt_enosys_stub, stub)
  20. #ifndef __NR_mq_timedreceive
  21. make_stub(mq_receive)
  22. # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
  23. make_stub(mq_timedreceive)
  24. # endif
  25. #endif
  26. #ifndef __NR_mq_timedsend
  27. make_stub(mq_send)
  28. # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
  29. make_stub(mq_timedsend)
  30. # endif
  31. #endif
  32. #endif