diff --git a/getdents.diff b/getdents.diff new file mode 100644 index 0000000..3c4cb5d --- /dev/null +++ b/getdents.diff @@ -0,0 +1,28 @@ +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 + } diff --git a/xfsdump.changes b/xfsdump.changes index 84a4f03..9ebf1e6 100644 --- a/xfsdump.changes +++ b/xfsdump.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 9 19:09:21 UTC 2013 - schwab@suse.de + +- getdents.diff: Handle platforms without getents syscall + ------------------------------------------------------------------- Sat May 26 08:46:48 UTC 2012 - jengelh@inai.de diff --git a/xfsdump.spec b/xfsdump.spec index 6cda98a..fd6c37e 100644 --- a/xfsdump.spec +++ b/xfsdump.spec @@ -1,7 +1,7 @@ # # spec file for package xfsdump # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Group: System/Filesystems Source0: xfsdump-%version.tar.gz Patch0: xfsdump-docdir.diff Patch1: xfsdump-3.0.1-fix-bufferoverflow.diff +Patch2: getdents.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -59,6 +60,7 @@ Authors: %setup -q %patch0 %patch1 -p1 +%patch2 -p1 %build export DEBUG=-DNDEBUG