From: Markos Chandras <[email protected]>

Signed-off-by: Markos Chandras <[email protected]>
---
 libc/sysdeps/linux/common/ustat.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/libc/sysdeps/linux/common/ustat.c 
b/libc/sysdeps/linux/common/ustat.c
index e97fa76..b89b4c9 100644
--- a/libc/sysdeps/linux/common/ustat.c
+++ b/libc/sysdeps/linux/common/ustat.c
@@ -9,8 +9,22 @@
 
 #include <sys/syscall.h>
 #include <sys/ustat.h>
+#include <sys/vfs.h>
 #include <sys/sysmacros.h>
+#include <string.h>
 
+#if ! defined(__NR_ustat)
+/*
+ * ustat syscall is deprecated and statfs or fstatfs should
+ * be used instead. There is no way to provide a wrapper for the
+ * newer syscalls, so just mark this syscall as unimplemented
+ */
+int ustat(dev_t dev, struct ustat* ubuf)
+{
+       __set_errno (ENOSYS);
+       return -1;
+}
+#else
 #define __NR___syscall_ustat __NR_ustat
 /* Kernel's fs/super.c defines this:
  * long sys_ustat(unsigned dev, struct ustat __user * ubuf),
@@ -24,3 +38,4 @@ int ustat(dev_t dev, struct ustat *ubuf)
 {
        return __syscall_ustat(dev, ubuf);
 }
+#endif
-- 
1.7.1


_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to