From 7ef696628e6e74708bd52fa0da79074adf8a25d6 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Feb 05 2022 20:36:57 +0000 Subject: Apply upstream patch to fix build on 32-bit architectures --- diff --git a/swayidle-1.7.1-Fix-printf-using-size_t-lineno-variable.patch b/swayidle-1.7.1-Fix-printf-using-size_t-lineno-variable.patch new file mode 100644 index 0000000..13c7cc7 --- /dev/null +++ b/swayidle-1.7.1-Fix-printf-using-size_t-lineno-variable.patch @@ -0,0 +1,22 @@ +From e81d40fca7533f73319e76e42fa9694b21cc9e6e Mon Sep 17 00:00:00 2001 +From: Stacy Harper +Date: Sat, 15 Jan 2022 17:39:47 +0100 +Subject: [PATCH] Fix printf using size_t lineno variable + +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index 9ea3f0b3..b524e738 100644 +--- a/main.c ++++ b/main.c +@@ -1004,7 +1004,7 @@ static int load_config(const char *config_path) { + parse_idlehint(p.we_wordc, p.we_wordv); + } else { + line[i] = 0; +- swayidle_log(LOG_ERROR, "Unexpected keyword \"%s\" in line %lu", line, lineno); ++ swayidle_log(LOG_ERROR, "Unexpected keyword \"%s\" in line %zu", line, lineno); + free(line); + return -EINVAL; + } diff --git a/swayidle.spec b/swayidle.spec index b843a37..e3dff30 100644 --- a/swayidle.spec +++ b/swayidle.spec @@ -10,6 +10,8 @@ Source1: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.sig # 0FDE7BE0E88F5E48: emersion Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg +Patch0: %{url}/commit/e81d40fca7533f73319e76e42fa9694b21cc9e6e.patch#/swayidle-1.7.1-Fix-printf-using-size_t-lineno-variable.patch + BuildRequires: meson >= 0.48.0 BuildRequires: gcc BuildRequires: gnupg2 @@ -24,7 +26,7 @@ swayidle is an idle management daemon for Wayland compositors. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%autosetup +%autosetup -p1 %build %meson @@ -55,6 +57,7 @@ swayidle is an idle management daemon for Wayland compositors. * Sat Feb 05 2022 Aleksei Bavshin - 1.7.1-1 - Update to 1.7.1 (#2041188) - Add source verification +- Apply upstream patch to fix build on 32-bit architectures * Sat Jan 22 2022 Fedora Release Engineering - 1.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild