OSDN Git Service

ustat: Add ustat stub for arches that don't have the ustat system call
authorMarkos Chandras <markos.chandras@imgtec.com>
Fri, 12 Oct 2012 10:20:12 +0000 (11:20 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 20 Feb 2013 12:45:13 +0000 (13:45 +0100)
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/sysdeps/linux/common/stubs.c
libc/sysdeps/linux/common/ustat.c

index 43a1b69..36fcc62 100644 (file)
@@ -464,6 +464,10 @@ make_stub(umount2)
 make_stub(unshare)
 #endif
 
+#if defined __UCLIBC_SV4_DEPRECATED__ && !defined __NR_ustat
+make_stub(ustat)
+#endif
+
 #if !defined __NR_vhangup && defined __UCLIBC_LINUX_SPECIFIC__
 make_stub(vhangup)
 #endif
index 157b3be..dbb545f 100644 (file)
@@ -11,7 +11,8 @@
 #include <sys/ustat.h>
 #include <sys/sysmacros.h>
 
-#define __NR___syscall_ustat __NR_ustat
+#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),
  * thus we use unsigned, not __kernel_dev_t.
@@ -24,3 +25,4 @@ int ustat(dev_t dev, struct ustat *ubuf)
 {
        return __syscall_ustat(dev, ubuf);
 }
+#endif