]> git.pld-linux.org Git - packages/elfutils.git/blame - x32.patch
macros for __enable_disable
[packages/elfutils.git] / x32.patch
CommitLineData
637c1908
JR
1diff -ur elfutils-0.178/debuginfod/debuginfod-client.c elfutils-0.178-x32/debuginfod/debuginfod-client.c
2--- elfutils-0.178/debuginfod/debuginfod-client.c 2019-11-26 23:48:42.000000000 +0100
3+++ elfutils-0.178-x32/debuginfod/debuginfod-client.c 2020-03-27 22:47:53.398098750 +0100
4@@ -170,7 +170,11 @@
5 if (fd < 0)
6 return -errno;
7
8+#if defined(__x86_64__) && defined(__ILP32__)
9+ if (dprintf(fd, "%lld", cache_clean_default_interval_s) < 0)
10+#else
11 if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
12+#endif
13 return -errno;
14
15 /* init max age config file. */
16@@ -178,7 +178,11 @@
17 && (fd = open(maxage_path, O_CREAT | O_RDWR, 0666)) < 0)
18 return -errno;
19
20+#if defined(__x86_64__) && defined(__ILP32__)
21+ if (dprintf(fd, "%lld", cache_default_max_unused_age_s) < 0)
22+#else
23 if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
24+#endif
25 return -errno;
26
27 return 0;
28@@ -204,7 +204,11 @@
29 if (interval_file == NULL)
30 return -errno;
31
32+#if defined(__x86_64__) && defined(__ILP32__)
33+ int rc = fprintf(interval_file, "%lld", cache_clean_default_interval_s);
34+#else
35 int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
36+#endif
37 fclose(interval_file);
38
39 if (rc < 0)
40@@ -214,7 +214,11 @@
41 /* Check timestamp of interval file to see whether cleaning is necessary. */
42 time_t clean_interval;
43 interval_file = fopen(interval_path, "r");
44+#if defined(__x86_64__) && defined(__ILP32__)
45+ if (fscanf(interval_file, "%lld", &clean_interval) != 1)
46+#else
47 if (fscanf(interval_file, "%ld", &clean_interval) != 1)
48+#endif
49 clean_interval = cache_clean_default_interval_s;
50 fclose(interval_file);
51
52@@ -227,7 +227,11 @@
53 max_unused_file = fopen(max_unused_path, "r");
54 if (max_unused_file)
55 {
56+#if defined(__x86_64__) && defined(__ILP32__)
57+ if (fscanf(max_unused_file, "%lld", &max_unused_age) != 1)
58+#else
59 if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
60+#endif
61 max_unused_age = cache_default_max_unused_age_s;
62 fclose(max_unused_file);
63 }
This page took 0.095919 seconds and 4 git commands to generate.