summaryrefslogtreecommitdiff
path: root/app-misc/tracker/files/3.6.0-configure-c99.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-05 20:03:56 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-05 20:03:56 +0000
commit17ad5d72e60411f0ed843a9dbeb450d89f63d62c (patch)
tree6760805f03473ce66ac45f6d86c78db649702a7e /app-misc/tracker/files/3.6.0-configure-c99.patch
parent8fd9d385e5bc3c01115ec2ddcb2227607eb90861 (diff)
gentoo auto-resync : 05:01:2024 - 20:03:55
Diffstat (limited to 'app-misc/tracker/files/3.6.0-configure-c99.patch')
-rw-r--r--app-misc/tracker/files/3.6.0-configure-c99.patch52
1 files changed, 52 insertions, 0 deletions
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 <slyich@gmail.com>
+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 (&timestamp, &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