Summary:
This is for OS X; there is apparently some difference between
its types and Linux's typical types, causing incomopatibilities between
a `long int` and a `long long int`. These two explicit template
instantiations fix the issue.
Test Plan: g++-4.9 on OS X compiles these files now.
Reviewed By: lucian@fb.com
Subscribers: folly-diffs@, yfeldblum, chalfant
FB internal diff:
D2040509
Signature: t1:
2040509:
1430516624:
9db8146b7824c0d09bac418a10a5f54451cdd5db
}
length = (length + options_.pageSize - 1) & ~(options_.pageSize - 1);
- length = std::min(length, mapLength_ - offset);
+ length = std::min<size_t>(length, mapLength_ - offset);
char* mapStart = static_cast<char*>(mapStart_) + offset;
PLOG_IF(WARNING, ::madvise(mapStart, length, advice)) << "madvise";
auto delay_ms = std::chrono::duration_cast<
std::chrono::milliseconds>(time - Clock::now()).count() + 1;
// If clock is not monotonic
- delay_ms = std::max(delay_ms, 0L);
+ delay_ms = std::max<long long int>(delay_ms, 0L);
eventBase_->tryRunAfterDelay(func, delay_ms);
}