--- elfutils-0.181/debuginfod/debuginfod-client.c.orig 2020-09-08 13:45:06.000000000 +0200 +++ elfutils-0.181/debuginfod/debuginfod-client.c 2020-10-16 19:21:30.944032365 +0200 @@ -222,7 +222,11 @@ if (fd < 0) return -errno; +#if defined(__x86_64__) && defined(__ILP32__) + if (dprintf(fd, "%lld", cache_clean_default_interval_s) < 0) +#else if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0) +#endif return -errno; /* init max age config file. */ @@ -230,7 +234,11 @@ && (fd = open(maxage_path, O_CREAT | O_RDWR, 0666)) < 0) return -errno; +#if defined(__x86_64__) && defined(__ILP32__) + if (dprintf(fd, "%lld", cache_default_max_unused_age_s) < 0) +#else if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0) +#endif return -errno; return 0; @@ -256,7 +264,11 @@ if (interval_file == NULL) return -errno; +#if defined(__x86_64__) && defined(__ILP32__) + int rc = fprintf(interval_file, "%lld", cache_clean_default_interval_s); +#else int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s); +#endif fclose(interval_file); if (rc < 0) @@ -268,7 +280,11 @@ interval_file = fopen(interval_path, "r"); if (interval_file) { +#if defined(__x86_64__) && defined(__ILP32__) + if (fscanf(interval_file, "%lld", &clean_interval) != 1) +#else if (fscanf(interval_file, "%ld", &clean_interval) != 1) +#endif clean_interval = cache_clean_default_interval_s; fclose(interval_file); } @@ -284,7 +300,11 @@ max_unused_file = fopen(max_unused_path, "r"); if (max_unused_file) { +#if defined(__x86_64__) && defined(__ILP32__) + if (fscanf(max_unused_file, "%lld", &max_unused_age) != 1) +#else if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1) +#endif max_unused_age = cache_default_max_unused_age_s; fclose(max_unused_file); }