mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
distcc: fix for x86_gcc2 (#3614)
This commit is contained in:
@@ -244,3 +244,49 @@ index ea76624..225dd85 100644
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From dee05d0645432f9678fe1497718e97c4c5c1751b Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@gmail.com>
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user