summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2012-04-04 18:58:41 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2012-04-04 18:58:41 +0000
commitd7dcad91ec2ec82ca925e6d717f71937ac6dd92e (patch)
treef27eee79635a53184124eb157c8d1e564ffd89bf
parentfa07b3b24c37b7a8bab5937336fc2a9b9881a9c7 (diff)
downloaddistcc-git-d7dcad91ec2ec82ca925e6d717f71937ac6dd92e.tar.gz
Fix for distcc issue 98 <http://code.google.com/p/distcc/issues/detail?id=98>:
build problem with -Werror due to ignoring return value of 'chdir'.
-rw-r--r--src/zeroconf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 0de0957..5b70566 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -598,8 +598,11 @@ int dcc_zeroconf_add_hosts(struct dcc_hostdef **ret_list, int *ret_nhosts, int n
setsid();
#endif
- chdir("/");
+ int ret = chdir("/");
rs_add_logger(rs_logger_syslog, RS_LOG_DEBUG, NULL, 0);
+ if (ret != 0) {
+ rs_log_warning("chdir to '/' failed: %s", strerror(errno));
+ }
_exit(daemon_proc(host_file, lock_file, n_slots));
}