diff --git a/xrootd-32bit-format.patch b/xrootd-32bit-format.patch new file mode 100644 index 0000000..14e912b --- /dev/null +++ b/xrootd-32bit-format.patch @@ -0,0 +1,32 @@ +From e5fedffb0d0e4d479e8a152ffb6c89eebab76c0c Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 25 Feb 2021 17:19:13 +0100 +Subject: [PATCH] Fix format error on 32 bit architectures + +error: format '%ld' expects argument of type 'long int', but argument +3 has type 'uint64_t' {aka 'long long unsigned int'} +--- + src/XrdClHttp/Posix.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/XrdClHttp/src/XrdClHttp/Posix.cc b/src/XrdClHttp/src/XrdClHttp/Posix.cc +index cdd3317..4c47382 100644 +--- a/src/XrdClHttp/src/XrdClHttp/Posix.cc ++++ b/src/XrdClHttp/src/XrdClHttp/Posix.cc +@@ -341,11 +341,11 @@ std::pair _PRead(Davix::DavPosix& davix_client, DAVIX_FD* fd, + Davix::DavixError* err = nullptr; + int num_bytes_read; + if (no_pread) { // continue reading from the current offset position +- printf("Posix::Read(size=%d)\n", size); ++ printf("Posix::Read(size=%u)\n", size); + num_bytes_read = davix_client.read(fd, buffer, size, &err); + } + else { +- printf("Posix::PRead(size=%d, offset=%ld)\n", size, offset); ++ printf("Posix::PRead(size=%u, offset=%llu)\n", size, (unsigned long long)offset); + num_bytes_read = davix_client.pread(fd, buffer, size, offset, &err); + } + if (num_bytes_read < 0) { +-- +2.29.2 + diff --git a/xrootd.spec b/xrootd.spec index 9b28a34..ddb91b3 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -28,6 +28,9 @@ Source0: http://xrootd.org/download/v%{version}/%{name}-%{version}.tar.gz # Library dependency should use target name # https://github.com/xrootd/xrootd-ceph/pull/14 Patch0: %{name}-ceph-deps.patch +# Fix format error on 32 bit architectures +# https://github.com/xrootd/xrdcl-http/pull/7 +Patch1: %{name}-32bit-format.patch BuildRequires: gcc-c++ BuildRequires: cmake3 >= 3.1 @@ -280,6 +283,7 @@ This package contains the API documentation of the xrootd libraries. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %cmake3 \ @@ -650,6 +654,7 @@ fi replacing the packages built from separate source rpms - Drop patches (accepted upstream or previously backported) - Fix broken library dependency in XrdCeph cmake file +- Fix format error on 32 bit architectures * Sat Feb 13 2021 Mattias Ellert - 1:5.0.3-5 - Drop workaround for false positive warning from gcc 11