From 4a85d69ff0405499650a2b52b766f73f2bce80ac Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 8 Jan 2024 12:34:09 +0100 Subject: [PATCH] Backport upstream patch to fix C compatibility issue in Meson probe Related to: --- tracker-meson-c99.patch | 21 +++++++++++++++++++++ tracker.spec | 6 +++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tracker-meson-c99.patch diff --git a/tracker-meson-c99.patch b/tracker-meson-c99.patch new file mode 100644 index 0000000..258864f --- /dev/null +++ b/tracker-meson-c99.patch @@ -0,0 +1,21 @@ +diff --git a/meson.build b/meson.build +index 2529a2c6e06ef8c4..b5cfca155816c9bf 100644 +--- a/meson.build ++++ b/meson.build +@@ -211,13 +211,13 @@ result = cc.run(''' + int main (int argc, char *argv[]) { + char *modifiers[] = { "%Y", "%C%y", "%4Y", "%2C%y", NULL }; + time_t timestamp = -58979923200; /* 0101-01-01T01:01:01Z */ +- char *buf[100]; ++ char buf[100]; + struct tm tm; + int i; + gmtime_r (×tamp, &tm); + for (i = 0; modifiers[i]; i++) { +- strftime (&buf, sizeof buf, modifiers[i], &tm); +- if (strcmp (&buf, "0101") == 0) { ++ strftime (buf, sizeof buf, modifiers[i], &tm); ++ if (strcmp (buf, "0101") == 0) { + printf ("%s", modifiers[i]); + return 0; + } diff --git a/tracker.spec b/tracker.spec index 916fdfc..a8f3832 100644 --- a/tracker.spec +++ b/tracker.spec @@ -4,12 +4,13 @@ Name: tracker Version: 3.6.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Desktop-neutral metadata database and search tool License: GPL-2.0-or-later URL: https://gnome.pages.gitlab.gnome.org/tracker/ Source0: https://download.gnome.org/sources/tracker/3.6/tracker-%{tarball_version}.tar.xz +Patch0: tracker-meson-c99.patch BuildRequires: asciidoc BuildRequires: gettext @@ -167,6 +168,9 @@ The %{name}-devel package contains the documentation for %{name}. %changelog +* Mon Jan 08 2024 Florian Weimer - 3.6.0-2 +- Backport upstream patch to fix C compatibility issue in Meson probe + * Tue Sep 19 2023 Kalev Lember - 3.6.0-1 - Update to 3.6.0