Fix aarch64 libdroplet compatibility

This commit is contained in:
2022-03-10 09:09:40 +01:00
parent ddff76aa1f
commit 35c465232b
2 changed files with 27 additions and 1 deletions
+6 -1
View File
@@ -36,7 +36,7 @@
Name: bareos Name: bareos
Version: 21.0.0 Version: 21.0.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: Backup Archiving REcovery Open Sourced - metapackage Summary: Backup Archiving REcovery Open Sourced - metapackage
License: AGPL-3.0 License: AGPL-3.0
@@ -45,6 +45,7 @@ Source0: https://github.com/%{name}/%{name}/archive/Release/%{version}.tar
Source1: bareos-tmpfiles.d.conf Source1: bareos-tmpfiles.d.conf
Patch0: openssl-3.0-warnings.patch Patch0: openssl-3.0-warnings.patch
Patch1: libdroplet-aarch64-format.patch
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: gcc BuildRequires: gcc
@@ -505,6 +506,7 @@ This package contains the CEPH plugins for the file daemon.
%prep %prep
%setup -q -n %{name}-Release-%{version} %setup -q -n %{name}-Release-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
# EL7: Use the Developer Toolset 8 compiler as the default is too old. # EL7: Use the Developer Toolset 8 compiler as the default is too old.
@@ -1229,6 +1231,9 @@ fi
%endif %endif
%changelog %changelog
* Wed Mar 09 2022 Daniel Uvehag <daniel.uvehag@gmail.com> 21.0.0-2
- Patch snprintf format warnings for aarch64
* Mon Feb 28 2022 Daniel Uvehag <daniel.uvehag@gmail.com> 21.0.0-1 * Mon Feb 28 2022 Daniel Uvehag <daniel.uvehag@gmail.com> 21.0.0-1
- Upgrade to 21.0.0 - Upgrade to 21.0.0
+21
View File
@@ -0,0 +1,21 @@
diff -Naur a/core/src/droplet/libdroplet/src/backend/posix/backend.c b/core/src/droplet/libdroplet/src/backend/posix/backend.c
--- a/core/src/droplet/libdroplet/src/backend/posix/backend.c 2021-12-21 12:00:49.000000000 +0100
+++ b/core/src/droplet/libdroplet/src/backend/posix/backend.c 2022-03-10 08:53:14.873899783 +0100
@@ -144,7 +144,7 @@
goto end;
}
- snprintf(buf, sizeof(buf), "%ld", st.st_nlink);
+ snprintf(buf, sizeof(buf), "%"PRIuMAX, (uintmax_t)st.st_nlink);
ret2 = dpl_dict_add(metadata, "nlink", buf, 0);
if (DPL_SUCCESS != ret2) {
ret = ret2;
@@ -179,7 +179,7 @@
goto end;
}
- snprintf(buf, sizeof(buf), "%lu", st.st_blksize);
+ snprintf(buf, sizeof(buf), "%"PRIuMAX, (uintmax_t)st.st_blksize);
ret2 = dpl_dict_add(metadata, "blksize", buf, 0);
if (DPL_SUCCESS != ret2) {
ret = ret2;