forked from pool/xfsdump
b5c093debb
- getdents.diff: Handle platforms without getents syscall OBS-URL: https://build.opensuse.org/request/show/158722 OBS-URL: https://build.opensuse.org/package/show/filesystems/xfsdump?expand=0&rev=14
29 lines
688 B
Diff
29 lines
688 B
Diff
Index: xfsdump-3.0.5/common/getdents.c
|
|
===================================================================
|
|
--- xfsdump-3.0.5.orig/common/getdents.c
|
|
+++ xfsdump-3.0.5/common/getdents.c
|
|
@@ -51,6 +51,9 @@
|
|
#ifdef __hppa__
|
|
# define __ASSUME_GETDENTS64_SYSCALL 1
|
|
#endif
|
|
+#ifndef SYS_getdents
|
|
+# define __ASSUME_GETDENTS64_SYSCALL 1
|
|
+#endif
|
|
|
|
#ifndef __set_errno
|
|
#define __set_errno(e) (errno = (e))
|
|
@@ -207,6 +210,7 @@ getdents_wrap (int fd, char *buf, size_t
|
|
# endif
|
|
}
|
|
#endif
|
|
+#ifdef SYS_getdents
|
|
{
|
|
size_t red_nbytes;
|
|
struct kernel_dirent *skdp, *kdp;
|
|
@@ -265,4 +269,5 @@ getdents_wrap (int fd, char *buf, size_t
|
|
}
|
|
|
|
return (char *) dp - buf;
|
|
+#endif
|
|
}
|