revert 9b1077dc70e52ee85a718bce3fcfec7ae9af2967 partially
[uclibc-ng.git] / librt / rt_stubs.c
bloba2b84e62afc2ceb70c4b090163472d0061b4b7a6
1 /*
2 * system call not available stub
3 * based on libc's stubs.c
5 * Copyright (C) 2009 Analog Devices Inc.
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8 */
10 #include <errno.h>
11 #include <sys/syscall.h>
13 #ifdef __UCLIBC_HAS_STUBS__
15 static int rt_enosys_stub(void) __attribute_used__;
16 static int rt_enosys_stub(void)
18 __set_errno(ENOSYS);
19 return -1;
22 #define make_stub(stub) \
23 link_warning(stub, #stub ": this function is not implemented") \
24 strong_alias(rt_enosys_stub, stub)
26 #ifndef __NR_mq_timedreceive
27 make_stub(mq_receive)
28 # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
29 make_stub(mq_timedreceive)
30 # endif
31 #endif
33 #ifndef __NR_mq_timedsend
34 make_stub(mq_send)
35 # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
36 make_stub(mq_timedsend)
37 # endif
38 #endif
40 #endif