[PATCH v3 39/48] ustat: Add ustat stub for arches that don't have the ustat system call

Markos Chandras markos.chandras at gmail.com
Wed Jan 23 11:42:03 UTC 2013


From: Markos Chandras <markos.chandras at imgtec.com>

Signed-off-by: Markos Chandras <markos.chandras at imgtec.com>
---
 libc/sysdeps/linux/common/stubs.c | 12 ++++++++++++
 libc/sysdeps/linux/common/ustat.c |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
index 9f01714..72411e0 100644
--- a/libc/sysdeps/linux/common/stubs.c
+++ b/libc/sysdeps/linux/common/stubs.c
@@ -464,6 +464,18 @@ make_stub(umount2)
 make_stub(unshare)
 #endif
 
+#if !defined __NR_ustat
+make_stub(ustat)
+#endif
+
+#ifndef __NR_utimensat
+make_stub(futimens)
+make_stub(utimensat)
+# ifndef __NR_lutimes
+make_stub(lutimes)
+# endif
+#endif
+
 #if !defined __NR_vhangup && defined __UCLIBC_LINUX_SPECIFIC__
 make_stub(vhangup)
 #endif
diff --git a/libc/sysdeps/linux/common/ustat.c b/libc/sysdeps/linux/common/ustat.c
index 157b3be..28c9177 100644
--- a/libc/sysdeps/linux/common/ustat.c
+++ b/libc/sysdeps/linux/common/ustat.c
@@ -11,6 +11,7 @@
 #include <sys/ustat.h>
 #include <sys/sysmacros.h>
 
+#ifdef __NR_ustat
 #define __NR___syscall_ustat __NR_ustat
 /* Kernel's fs/super.c defines this:
  * long sys_ustat(unsigned dev, struct ustat __user * ubuf),
@@ -24,3 +25,4 @@ int ustat(dev_t dev, struct ustat *ubuf)
 {
 	return __syscall_ustat(dev, ubuf);
 }
+#endif
-- 
1.8.1.1




More information about the uClibc mailing list