blob: a2b84e62afc2ceb70c4b090163472d0061b4b7a6 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/*
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
15static int rt_enosys_stub(void) __attribute_used__;
16static 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
27make_stub(mq_receive)
28# ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
29make_stub(mq_timedreceive)
30# endif
31#endif
32
33#ifndef __NR_mq_timedsend
34make_stub(mq_send)
35# ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
36make_stub(mq_timedsend)
37# endif
38#endif
39
40#endif