linux fix
This commit is contained in:
parent
986d9a00c0
commit
1ea5db6110
@ -5,5 +5,5 @@ compiler:
|
|||||||
- clang
|
- clang
|
||||||
# - gcc
|
# - gcc
|
||||||
|
|
||||||
os: osx
|
# os: osx
|
||||||
script: make test
|
script: make test
|
||||||
|
@ -45,14 +45,20 @@ namespace ix
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
FD_SET(_eventfd.getFd(), &rfds);
|
int nfds = 2;
|
||||||
|
#else
|
||||||
|
int nfds = 1;
|
||||||
#endif
|
#endif
|
||||||
struct pollfd fds[1];
|
|
||||||
|
struct pollfd fds[nfds];
|
||||||
fds[0].fd = _sockfd;
|
fds[0].fd = _sockfd;
|
||||||
fds[0].events = POLLIN | POLLHUP | POLLERR;
|
fds[0].events = POLLIN | POLLHUP | POLLERR;
|
||||||
|
|
||||||
int timeout_msecs = timeoutSecs * 1000;
|
#ifdef __linux__
|
||||||
int ret = ::poll(fds, 1, timeout_msecs);
|
fds[1].fd = _eventfd.getFd();
|
||||||
|
fds[1].events = POLLIN | POLLHUP | POLLERR;
|
||||||
|
#endif
|
||||||
|
int ret = ::poll(fds, nfds, timeoutSecs * 1000);
|
||||||
|
|
||||||
PollResultType pollResult = PollResultType_ReadyForRead;
|
PollResultType pollResult = PollResultType_ReadyForRead;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -30,7 +30,7 @@ sanitizersFlags = {
|
|||||||
}
|
}
|
||||||
sanitizer = 'tsan'
|
sanitizer = 'tsan'
|
||||||
if osName == 'Linux':
|
if osName == 'Linux':
|
||||||
sanitizer = 'asan'
|
sanitizer = 'none'
|
||||||
|
|
||||||
sanitizerFlags = sanitizersFlags[sanitizer]
|
sanitizerFlags = sanitizersFlags[sanitizer]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user