Commit 44e4afcd authored by Kenton Varda's avatar Kenton Varda

Fix build on OSX and also GCC 4.7.

parent 5e2f41de
......@@ -29,7 +29,7 @@
#include <inttypes.h>
#include <limits>
#include <set>
#include <time.h>
#include <chrono>
namespace kj {
......@@ -211,7 +211,7 @@ UnixEventPort::UnixEventPort()
pthread_once(&registerReservedSignalOnce, &registerReservedSignal);
}
UnixEventPort::~UnixEventPort() {}
UnixEventPort::~UnixEventPort() noexcept(false) {}
Promise<short> UnixEventPort::onFdEvent(int fd, short eventMask) {
return newAdaptedPromise<short, PollPromiseAdapter>(*this, fd, eventMask);
......@@ -419,9 +419,8 @@ void UnixEventPort::gotSignal(const siginfo_t& siginfo) {
}
TimePoint UnixEventPort::currentSteadyTime() {
struct timespec tp;
KJ_SYSCALL(clock_gettime(CLOCK_MONOTONIC, &tp));
return origin<TimePoint>() + (tp.tv_sec * SECONDS + tp.tv_sec * NANOSECONDS);
return origin<TimePoint>() + std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::steady_clock::now().time_since_epoch()).count() * NANOSECONDS;
}
void UnixEventPort::processTimers() {
......
......@@ -50,7 +50,7 @@ class UnixEventPort: public EventPort {
public:
UnixEventPort();
~UnixEventPort();
~UnixEventPort() noexcept(false);
Promise<short> onFdEvent(int fd, short eventMask);
// `eventMask` is a bitwise-OR of poll events (e.g. `POLLIN`, `POLLOUT`, etc.). The next time
......
linux-gcc-4.7 929 ./super-test.sh tmpdir capnp-gcc-4.7 quick gcc-4.7
linux-gcc-4.8 930 ./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-gcc-4.7 930 ./super-test.sh tmpdir capnp-gcc-4.7 quick gcc-4.7
linux-gcc-4.8 929 ./super-test.sh tmpdir capnp-gcc-4.8 quick gcc-4.8
linux-clang 959 ./super-test.sh tmpdir capnp-clang quick clang
mac 884 ./super-test.sh remote beat caffeinate quick
cygwin 923 ./super-test.sh remote Kenton@flashman quick
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment