PKGBUILDs/community/distcc/allow-zero-timeout.patch
2014-07-07 11:41:06 +00:00

20 lines
723 B
Diff

diff -urN a/src/io.c b/src/io.c
--- a/src/io.c 2011-04-05 12:58:58.000000000 -0600
+++ b/src/io.c 2014-07-07 05:37:25.074543921 -0600
@@ -75,11 +75,10 @@
const char *user_timeout = getenv("DISTCC_IO_TIMEOUT");
if (user_timeout) {
int parsed_user_timeout = atoi(user_timeout);
- if (parsed_user_timeout <= 0) {
- rs_log_error("Bad DISTCC_IO_TIMEOUT value: %s", user_timeout);
- exit(EXIT_BAD_ARGUMENTS);
- }
- current_timeout = parsed_user_timeout;
+ if (parsed_user_timeout <= 0)
+ current_timeout = INT_MAX;
+ else
+ current_timeout = parsed_user_timeout;
} else {
current_timeout = default_dcc_io_timeout;
}