1 From f4231bfbb61cd4962638766a7072f4295ed39150 Mon Sep 17 00:00:00 2001
2 From: Alexander Kanavin <alex.kanavin@gmail.com>
3 Date: Mon, 19 Apr 2021 23:29:10 +0200
4 Subject: [PATCH] debuginfod/debuginfod-client.c: correct string format on x32
6 Upstream-Status: Inappropriate [x32-specific; few, if any people care about it anymore]
7 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
9 debuginfod/debuginfod-client.c | 10 +++++-----
10 1 file changed, 5 insertions(+), 5 deletions(-)
12 diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
13 index de26af5..a840f23 100644
14 --- a/debuginfod/debuginfod-client.c
15 +++ b/debuginfod/debuginfod-client.c
16 @@ -229,7 +229,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
20 - if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
21 + if (dprintf(fd, "%lld", cache_clean_default_interval_s) < 0)
24 /* init max age config file. */
25 @@ -237,7 +237,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
26 && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
29 - if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
30 + if (dprintf(fd, "%lld", cache_default_max_unused_age_s) < 0)
34 @@ -263,7 +263,7 @@ debuginfod_clean_cache(debuginfod_client *c,
35 if (interval_file == NULL)
38 - int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
39 + int rc = fprintf(interval_file, "%lld", cache_clean_default_interval_s);
40 fclose(interval_file);
43 @@ -275,7 +275,7 @@ debuginfod_clean_cache(debuginfod_client *c,
44 interval_file = fopen(interval_path, "r");
47 - if (fscanf(interval_file, "%ld", &clean_interval) != 1)
48 + if (fscanf(interval_file, "%lld", &clean_interval) != 1)
49 clean_interval = cache_clean_default_interval_s;
50 fclose(interval_file);
52 @@ -291,7 +291,7 @@ debuginfod_clean_cache(debuginfod_client *c,
53 max_unused_file = fopen(max_unused_path, "r");
56 - if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
57 + if (fscanf(max_unused_file, "%lld", &max_unused_age) != 1)
58 max_unused_age = cache_default_max_unused_age_s;
59 fclose(max_unused_file);