From: Pádraig Brady
Date: Sun, 2 Feb 2020 16:06:48 +0000 (+0000) Subject: read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX X-Git-Tag: v1.0~4282 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf718ebcb3ba3b12871eb293f49d80915cc05b0c;p=thirdparty%2Fgnulib.git read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX On x86_64 with glibc-2.30, gcc 9.2 is giving: error: argument 2 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] The details of this restriction are discussed at: https://stackoverflow.com/q/42574890/4421 * lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/ --- diff --git a/ChangeLog b/ChangeLog index 1e5f94d3c8..86f8626d68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2020-02-02 Pádraig Brady
+ + read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX + On x86_64 with glibc-2.30, gcc 9.2 is giving: + error: argument 2 value '18446744073709551615' + exceeds maximum object size 9223372036854775807 + [-Werror=alloc-size-larger-than=] + The details of this restriction are discussed at: + https://stackoverflow.com/q/42574890/4421 + * lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/ + 2020-02-02 Pádraig Brady
sysctl.h: avoid including on glibc
diff --git a/lib/read-file.c b/lib/read-file.c
index 50bb00f0cd..c6f230178c 100644
--- a/lib/read-file.c
+++ b/lib/read-file.c
@@ -25,7 +25,7 @@
/* Get ftello. */
#include