[PATCH] support kernels without __ARCH_WANT_SYSCALL_DEPRECATED
Mark Salter
msalter at redhat.com
Thu Apr 26 14:16:53 UTC 2012
---
libc/sysdeps/linux/common/getdents.c | 4 +++-
libc/sysdeps/linux/common/ustat.c | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 46f7b8e..61be25b 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -44,10 +44,12 @@ struct kernel_dirent
ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
+#ifdef __NR_getdents
#define __NR___syscall_getdents __NR_getdents
static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
+#endif
-#if defined __ASSUME_GETDENTS32_D_TYPE
+#if defined __NR_getdents && defined __ASSUME_GETDENTS32_D_TYPE
ssize_t __getdents (int fd, char *buf, size_t nbytes)
{
diff --git a/libc/sysdeps/linux/common/ustat.c b/libc/sysdeps/linux/common/ustat.c
index e97fa76..1bcb581 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.7.9.1
More information about the uClibc
mailing list