]> git.pld-linux.org Git - packages/elfutils.git/blame - x32.patch
- updated to 0.181
[packages/elfutils.git] / x32.patch
CommitLineData
b551feda
JB
1--- elfutils-0.181/debuginfod/debuginfod-client.c.orig 2020-09-08 13:45:06.000000000 +0200
2+++ elfutils-0.181/debuginfod/debuginfod-client.c 2020-10-16 19:21:30.944032365 +0200
3@@ -222,7 +222,11 @@
637c1908
JR
4 if (fd < 0)
5 return -errno;
6
7+#if defined(__x86_64__) && defined(__ILP32__)
8+ if (dprintf(fd, "%lld", cache_clean_default_interval_s) < 0)
9+#else
10 if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
11+#endif
12 return -errno;
13
14 /* init max age config file. */
b551feda 15@@ -230,7 +234,11 @@
637c1908
JR
16 && (fd = open(maxage_path, O_CREAT | O_RDWR, 0666)) < 0)
17 return -errno;
18
19+#if defined(__x86_64__) && defined(__ILP32__)
20+ if (dprintf(fd, "%lld", cache_default_max_unused_age_s) < 0)
21+#else
22 if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
23+#endif
24 return -errno;
25
26 return 0;
b551feda 27@@ -256,7 +264,11 @@
637c1908
JR
28 if (interval_file == NULL)
29 return -errno;
30
31+#if defined(__x86_64__) && defined(__ILP32__)
32+ int rc = fprintf(interval_file, "%lld", cache_clean_default_interval_s);
33+#else
34 int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
35+#endif
36 fclose(interval_file);
37
38 if (rc < 0)
b551feda 39@@ -268,7 +280,11 @@
637c1908 40 interval_file = fopen(interval_path, "r");
b551feda
JB
41 if (interval_file)
42 {
637c1908 43+#if defined(__x86_64__) && defined(__ILP32__)
b551feda 44+ if (fscanf(interval_file, "%lld", &clean_interval) != 1)
637c1908 45+#else
b551feda 46 if (fscanf(interval_file, "%ld", &clean_interval) != 1)
637c1908 47+#endif
b551feda
JB
48 clean_interval = cache_clean_default_interval_s;
49 fclose(interval_file);
50 }
51@@ -284,7 +300,11 @@
637c1908
JR
52 max_unused_file = fopen(max_unused_path, "r");
53 if (max_unused_file)
54 {
55+#if defined(__x86_64__) && defined(__ILP32__)
56+ if (fscanf(max_unused_file, "%lld", &max_unused_age) != 1)
57+#else
58 if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
59+#endif
60 max_unused_age = cache_default_max_unused_age_s;
61 fclose(max_unused_file);
62 }
This page took 0.041331 seconds and 4 git commands to generate.