Skip to content

Commit

Permalink
NetBSD doesn't support llroundl() so work around it by using llround(…
Browse files Browse the repository at this point in the history
…). Issue #593.
  • Loading branch information
FooBarWidget committed Dec 8, 2010
1 parent bb0c938 commit d79f57f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ext/common/MessageChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,18 @@ class MessageChannel {
unsigned int ret;
try {
ret = Passenger::readExact(fd, buf, size, &t);
*timeout = llroundl((long double) t / 1000);
#ifdef __NetBSD__
*timeout = llround((double) t / 1000);
#else
*timeout = llroundl((long double) t / 1000);
#endif
return ret == size;
} catch (...) {
*timeout = llroundl((long double) t / 1000);
#ifdef __NetBSD__
*timeout = llround((double) t / 1000);
#else
*timeout = llroundl((long double) t / 1000);
#endif
throw;
}
} else {
Expand Down

0 comments on commit d79f57f

Please sign in to comment.