From 17ad5d72e60411f0ed843a9dbeb450d89f63d62c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 5 Jan 2024 20:03:56 +0000 Subject: gentoo auto-resync : 05:01:2024 - 20:03:55 --- app-misc/tracker/files/3.6.0-configure-c99.patch | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 app-misc/tracker/files/3.6.0-configure-c99.patch (limited to 'app-misc/tracker/files/3.6.0-configure-c99.patch') diff --git a/app-misc/tracker/files/3.6.0-configure-c99.patch b/app-misc/tracker/files/3.6.0-configure-c99.patch new file mode 100644 index 000000000000..f5de3e2746ce --- /dev/null +++ b/app-misc/tracker/files/3.6.0-configure-c99.patch @@ -0,0 +1,52 @@ +https://bugs.gentoo.org/919095 +https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/638 +https://gitlab.gnome.org/GNOME/tracker/-/commit/f7393d61803815b19a1f210b197cce423ae3cc01 + +From f7393d61803815b19a1f210b197cce423ae3cc01 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 3 Dec 2023 12:10:27 +0000 +Subject: [PATCH] build: Fix "4-digit year modifier" test + +Upcoming `gcc-14` enabled a few warnings into errors, like +`-Wincompatible-pointer-types`. This caused `tracker` configure to +fail as: + + $ ../meson + ... + Checking if "strftime 4-digit year modifier" runs: DID NOT COMPILE + + ../meson.build:235:2: ERROR: Problem encountered: Libc implementation has broken 4-digit years implementation. + +This happens because char buffer had an unusual type: + + testfile.c: In function 'main': + testfile.c:16:17: error: passing argument 1 of 'strftime' from incompatible pointer type + [-Wincompatible-pointer-types] + 16 | strftime (&buf, sizeof buf, modifiers[i], &tm); + | ^~~~ + | | + | char * (*)[100] +--- a/meson.build ++++ b/meson.build +@@ -215,15 +215,15 @@ 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; ++ return 0; + } + } + return -1; +-- +GitLab -- cgit v1.2.3