From e8b24eb13cd7d80a451259d64b037d7729fdebdb Mon Sep 17 00:00:00 2001 From: hanya Date: Tue, 5 Feb 2019 14:06:40 +0000 Subject: [PATCH] distcc: fix for x86_gcc2 (#3614) --- .../distcc/patches/distcc-3.2~rc1.patchset | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sys-devel/distcc/patches/distcc-3.2~rc1.patchset b/sys-devel/distcc/patches/distcc-3.2~rc1.patchset index 11edd4c90..913fda34f 100644 --- a/sys-devel/distcc/patches/distcc-3.2~rc1.patchset +++ b/sys-devel/distcc/patches/distcc-3.2~rc1.patchset @@ -244,3 +244,49 @@ index ea76624..225dd85 100644 -- 2.14.2 + +From dee05d0645432f9678fe1497718e97c4c5c1751b Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Thu, 18 Sep 2014 09:53:05 +0200 +Subject: wrong position of definition of variables + + +diff --git a/src/compile.c b/src/compile.c +index 0597999..8f791f4 100644 +--- a/src/compile.c ++++ b/src/compile.c +@@ -77,11 +77,12 @@ static int dcc_get_max_discrepancies_before_demotion(void) + * pump.in script! */ + static const int default_setting = 1; + static int current_setting = 0; ++ const char* user_setting = NULL; + + if (current_setting > 0) + return current_setting; + +- const char *user_setting = getenv("DISTCC_MAX_DISCREPANCY"); ++ user_setting = getenv("DISTCC_MAX_DISCREPANCY"); + if (user_setting) { + int parsed_user_setting = atoi(user_setting); + if (parsed_user_setting <= 0) { +diff --git a/src/io.c b/src/io.c +index 5206035..c481fff 100644 +--- a/src/io.c ++++ b/src/io.c +@@ -68,11 +68,12 @@ int dcc_get_io_timeout(void) + * because compiling files can take a long time. **/ + static const int default_dcc_io_timeout = 300; /* seconds */ + static int current_timeout = 0; ++ const char* user_timeout = NULL; + + if (current_timeout > 0) + return current_timeout; + +- const char *user_timeout = getenv("DISTCC_IO_TIMEOUT"); ++ user_timeout = getenv("DISTCC_IO_TIMEOUT"); + if (user_timeout) { + int parsed_user_timeout = atoi(user_timeout); + if (parsed_user_timeout <= 0) { +-- +2.14.2 +