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 
10 #include <errno.h>
11 #include <sys/syscall.h>
12 
13 #ifdef __UCLIBC_HAS_STUBS__
14 
15 static int rt_enosys_stub(void) __attribute_used__;
rt_enosys_stub(void)16 static int rt_enosys_stub(void)
17 {
18 	__set_errno(ENOSYS);
19 	return -1;
20 }
21 
22 #define make_stub(stub) \
23 	link_warning(stub, #stub ": this function is not implemented") \
24 	strong_alias(rt_enosys_stub, stub)
25 
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
32 
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
39 
40 #endif
41