diff --git a/0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch b/0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch index ba9b5f2..30dcccd 100644 --- a/0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch +++ b/0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch @@ -1,4 +1,4 @@ -From dcc25d4e18d2a61f8a72670282210a0abdce7f30 Mon Sep 17 00:00:00 2001 +From 7181b4125fc2a1057dffffaa643e6bcb549fd0eb Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Fri, 2 Nov 2018 14:27:00 +0100 Subject: [PATCH] Use new statx(2) system call to avoid hangs on NFS @@ -9,10 +9,10 @@ Signed-off-by: Werner Fink configure.ac | 38 +++--- src/fuser.c | 86 +++----------- src/statx.c | 147 +++++++++++++++++++++++ - src/statx.h | 61 ++++++++++ + src/statx.h | 66 +++++++++++ src/timeout.c | 372 ---------------------------------------------------------- src/timeout.h | 45 ------- - 7 files changed, 242 insertions(+), 511 deletions(-) + 7 files changed, 247 insertions(+), 511 deletions(-) create mode 100644 src/statx.c create mode 100644 src/statx.h delete mode 100644 src/timeout.c @@ -448,10 +448,10 @@ index 0000000..2554da7 +} diff --git src/statx.h src/statx.h new file mode 100644 -index 0000000..846e67d +index 0000000..548583d --- /dev/null +++ src/statx.h -@@ -0,0 +1,61 @@ +@@ -0,0 +1,66 @@ +/* + * statx.h - Map modern statx(2) system call to older stat(2), lstat(2), + * and fstat(2) replacements named {,l,f}statn() @@ -478,6 +478,11 @@ index 0000000..846e67d + +extern int stat_flags; +#if defined(HAVE_DECL_SYS_STATX) && HAVE_DECL_SYS_STATX == 1 ++# ifndef HAVE_STATX ++# define _ASM_GENERIC_FCNTL_H /* Avoid collisions between asm/fcntl.h and bits/fcntl.h ! */ ++# include /* Definition of AT_* and AT_STATX_* constants ! */ ++# include /* Provides 'struct statx' and STATX_* ! */ ++# endif +extern int statn(const char*, unsigned int, struct stat*); +extern int fstatn(int, unsigned int, struct stat*); +extern int lstatn(const char*, unsigned int, struct stat*); diff --git a/psmisc.changes b/psmisc.changes index 5d23442..9368322 100644 --- a/psmisc.changes +++ b/psmisc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Nov 5 07:48:25 UTC 2018 - Dr. Werner Fink + +- Modify patch 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch + to support older systems with statx kernel support + ------------------------------------------------------------------- Fri Nov 2 13:37:49 UTC 2018 - Dr. Werner Fink diff --git a/psmisc.spec b/psmisc.spec index 8eeb620..3fa6122 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,6 +24,7 @@ BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel BuildRequires: libselinux-devel +BuildRequires: linux-glibc-devel >= 4.12 BuildRequires: ncurses-devel Url: https://gitlab.com/psmisc/psmisc/ Version: 23.2