Fixed Issue #20: Compiling with gcc > 4.3 failes

This commit is contained in:
syed.amer@gilani.eu
2009-03-29 12:50:33 +00:00
parent 3580a29fd8
commit b3cf31bd7c
19 changed files with 40 additions and 18 deletions

View File

@@ -316,8 +316,10 @@ CArchNetworkBSD::pollSocket(CPollEntry pe[], int num, double timeout)
if (n > 0 && unblockPipe != NULL && (pfd[num].revents & POLLIN) != 0) {
// the unblock event was signalled. flush the pipe.
char dummy[100];
int ignore;
do {
read(unblockPipe[0], dummy, sizeof(dummy));
ignore = read(unblockPipe[0], dummy, sizeof(dummy));
} while (errno != EAGAIN);
// don't count this unblock pipe in return value
@@ -489,7 +491,9 @@ CArchNetworkBSD::unblockPollSocket(CArchThread thread)
const int* unblockPipe = getUnblockPipeForThread(thread);
if (unblockPipe != NULL) {
char dummy = 0;
write(unblockPipe[1], &dummy, 1);
int ignore;
ignore = write(unblockPipe[1], &dummy, 1);
}
}