[git commit future] add swapoff,swapon and symlink stubs
Peter S. Mazinger
ps.m at gmx.net
Wed Apr 20 10:50:38 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=4391066fefd9b1dd6e59944bd7212b662c41d18f
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future
Compile symlink only if syscall is available.
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
libc/sysdeps/linux/common/stubs.c | 12 ++++++++++++
libc/sysdeps/linux/common/symlink.c | 5 +++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index 314ebd2..c412bf1 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -235,6 +235,18 @@ make_stub(stime)
make_stub(settimeofday)
#endif
+#ifndef __NR_swapoff
+make_stub(swapoff)
+#endif
+
+#ifndef __NR_swapon
+make_stub(swapon)
+#endif
+
+#ifndef __NR_symlink
+make_stub(symlink)
+#endif
+
#ifndef __NR_fadvise64
make_ret_stub(posix_fadvise)
#endif
diff --git a/libc/sysdeps/linux/common/symlink.c b/libc/sysdeps/linux/common/symlink.c
index e53e8d4..15a576d 100644
--- a/libc/sysdeps/linux/common/symlink.c
+++ b/libc/sysdeps/linux/common/symlink.c
@@ -8,7 +8,8 @@
*/
#include <sys/syscall.h>
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
-#include <unistd.h>
+
+#if defined __NR_symlink && (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K)
+# include <unistd.h>
_syscall2(int, symlink, const char *, oldpath, const char *, newpath)
#endif
--
1.7.3.4
More information about the uClibc-cvs
mailing list