Permalink
Browse files

NetBSD doesn't support llroundl() so work around it by using llround(…

…). Issue #593.
  • Loading branch information...
1 parent bb0c938 commit d79f57fc4c6a6880b77b17d12f92283020f346cb @FooBarWidget FooBarWidget committed Dec 8, 2010
Showing with 10 additions and 2 deletions.
  1. +10 −2 ext/common/MessageChannel.h
@@ -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 {

0 comments on commit d79f57f

Please sign in to comment.