gentoo-ebuilds/app-misc/tinysparql/files/3.6.0-configure-c99.patch
Lukas Schmelting a00e2c6a66
app-misc/tinysparql: New package, pkgmove from app-misc/tracker
Signed-off-by: Lukas Schmelting <lschmelting@posteo.com>
Part-of: https://github.com/gentoo/gentoo/pull/42380
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-09 01:21:20 +01:00

52 lines
1.8 KiB
Diff

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