summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamal Mostafa <kamal@whence.com>2012-04-05 21:42:13 +0000
committerKamal Mostafa <kamal@whence.com>2012-04-05 21:42:13 +0000
commitc07850a6756dff96302f2164c06c4affa30a7397 (patch)
tree2fe13a6b491006e03610af2e7060ad4e948e0fbb
parent367944872e5585a4197f51c5afc0616f31310a11 (diff)
downloaddistcc-git-c07850a6756dff96302f2164c06c4affa30a7397.tar.gz
Fix for distcc issue 105 <http://code.google.com/p/distcc/issues/detail?id=105>
: lsdistcc.c compile fails: variable 'nready' set but not used [-Werror]
-rw-r--r--src/lsdistcc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lsdistcc.c b/src/lsdistcc.c
index 8bae7c8..a8d4ee1 100644
--- a/src/lsdistcc.c
+++ b/src/lsdistcc.c
@@ -720,6 +720,10 @@ static int one_poll_loop(struct rslave_s* rs, struct state_s states[],
* and make the program take longer than it should.
*/
nready = poll(pollfds, (unsigned)nfds, 50);
+ if (nready == -1) {
+ fprintf(stderr, "lsdistcc: poll failed: %s\n", strerror(errno));
+ exit(1);
+ }
gettimeofday(&now, 0);