Backport upstream patch to fix C compatibility issue in Meson probe
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
a1959a7838
commit
4a85d69ff0
21
tracker-meson-c99.patch
Normal file
21
tracker-meson-c99.patch
Normal file
@ -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;
|
||||
}
|
@ -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 <fweimer@redhat.com> - 3.6.0-2
|
||||
- Backport upstream patch to fix C compatibility issue in Meson probe
|
||||
|
||||
* Tue Sep 19 2023 Kalev Lember <klember@redhat.com> - 3.6.0-1
|
||||
- Update to 3.6.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user