diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-02-27 00:25:56 +0100 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-03 18:22:50 +0100 |
commit | 45dafbdb4e221f600895aa70a69e2e306093bd90 (patch) | |
tree | 64b4c9695592ae280287e681fa84052d2d4f0b42 /librt/rt_stubs.c | |
parent | 5ecbf1730329be5e04229fb1ea23f4bc0bc3d2a3 (diff) |
fix dependency on ADVANCED_REALTIME
Do not depend on ADVANCED REALTIME for mq_send/mq_receive
Added stubs implementation based on libc's stubs.c
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Diffstat (limited to 'librt/rt_stubs.c')
-rw-r--r-- | librt/rt_stubs.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/librt/rt_stubs.c b/librt/rt_stubs.c new file mode 100644 index 000000000..b2c09dea9 --- /dev/null +++ b/librt/rt_stubs.c @@ -0,0 +1,39 @@ +/* + * system call not available stub + * based on libc's stubs.c + * + * Copyright (C) 2009 Analog Devices Inc. + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include <errno.h> +#include <sys/syscall.h> + +#ifdef __UCLIBC_HAS_STUBS__ + +static int rt_enosys_stub(void) +{ + __set_errno(ENOSYS); + return -1; +} + +#define make_stub(stub) \ + link_warning(stub, #stub ": this function is not implemented") \ + strong_alias(rt_enosys_stub, stub) + +#ifndef __NR_mq_timedreceive +make_stub(mq_receive) +# ifdef __UCLIBC_HAS_ADVANCED_REALTIME__ +make_stub(mq_timedreceive) +# endif +#endif + +#ifndef __NR_mq_timedsend +make_stub(mq_send) +# ifdef __UCLIBC_HAS_ADVANCED_REALTIME__ +make_stub(mq_timedsend) +# endif +#endif + +#endif |