libntirpc 1.5.3 PR https://github.com/nfs-ganesha/ntirpc/pull/85
This commit is contained in:
parent
82c9c77ba6
commit
1da720aa3a
|
@ -0,0 +1,47 @@
|
|||
From 21ff8f02500477bda460cb5a5b363dacd97ef360 Mon Sep 17 00:00:00 2001
|
||||
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
|
||||
Date: Thu, 19 Oct 2017 12:01:14 -0400
|
||||
Subject: [PATCH] At the time of this writing, glibc-2.26 has a bug where
|
||||
sysconf(_SC_IOV_MAX); always returns -1.
|
||||
|
||||
Versions known to have this bug are glibc-2.26-8 in Fedora 27 beta
|
||||
and glibc-2.26.90-16 in Fedora 28 rawhide.
|
||||
|
||||
Upstream glibc BZ at
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=22321
|
||||
|
||||
Linux does have a limit on the size of the iovec that is passed in
|
||||
readv/writev syscalls; defined as UIO_MAXIOV (i.e. 1024) in
|
||||
.../include/uapi/linux/uio.h. See kernel source readv/writev syscalls.
|
||||
|
||||
It's also possible to get _XOPEN_IOV_MAX (i.e. 16) and IOV_MAX (1024)
|
||||
by wrapping <limits.h> with #define __USE_XOPEN ... #undef but that's
|
||||
XOpen and theoretically Linux could change.
|
||||
---
|
||||
src/svc.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/svc.c b/src/svc.c
|
||||
index 9ca5b791..eec79604 100644
|
||||
--- a/src/svc.c
|
||||
+++ b/src/svc.c
|
||||
@@ -227,7 +227,15 @@ svc_init(svc_init_params *params)
|
||||
mutex_unlock(&__svc_params->mtx);
|
||||
|
||||
#if defined(_SC_IOV_MAX) /* IRIX, MacOS X, FreeBSD, Solaris, ... */
|
||||
- __svc_maxiov = sysconf(_SC_IOV_MAX);
|
||||
+ {
|
||||
+ /*
|
||||
+ * some glibc (e.g. 2.26 in Fedora 27 beta) always
|
||||
+ * return -1
|
||||
+ */
|
||||
+ int i = sysconf(_SC_IOV_MAX);
|
||||
+ if (i != -1 && i > __svc_maxiov)
|
||||
+ __svc_maxiov = i;
|
||||
+ }
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.13.5
|
||||
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
Name: libntirpc
|
||||
Version: 1.5.3
|
||||
Release: 3%{?dev:%{dev}}%{?dist}
|
||||
Release: 4%{?dev:%{dev}}%{?dist}
|
||||
Summary: New Transport Independent RPC Library
|
||||
Group: System Environment/Libraries
|
||||
License: BSD
|
||||
Url: https://github.com/nfs-ganesha/ntirpc
|
||||
|
||||
Source0: https://github.com/nfs-ganesha/ntirpc/archive/v%{version}/ntirpc-%{version}.tar.gz
|
||||
Patch0: 0001-At-the-time-of-this-writing-glibc-2.26-has-a-bug-whe.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: krb5-devel
|
||||
|
@ -39,6 +40,7 @@ Development headers and auxiliary files for developing with %{name}.
|
|||
|
||||
%prep
|
||||
%setup -q -n ntirpc-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake . -DOVERRIDE_INSTALL_PREFIX=/usr -DTIRPC_EPOLL=1 -DUSE_GSS=ON "-GUnix Makefiles"
|
||||
|
@ -72,6 +74,9 @@ install -p -m 644 libntirpc.pc %{buildroot}%{_libdir}/pkgconfig/
|
|||
%{_libdir}/pkgconfig/libntirpc.pc
|
||||
|
||||
%changelog
|
||||
* Thu Oct 19 2017 Kaleb S. KEITHLEY <kkeithle at redhat.com> 1.5.3-4
|
||||
- libntirpc 1.5.3 PR https://github.com/nfs-ganesha/ntirpc/pull/85
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue