#include <unistd.h>
#include <string.h>
+using std::list;
+using namespace std::chrono;
+
inline void set_rand_seed() {
auto now = time_point_cast<nanoseconds>(steady_clock::now());
srandom((uint32_t)now.time_since_epoch().count()^(uint32_t)getpid());
lock cal(ca.m);
while (!ca.done) {
IF_LEVEL(2) LOG << "wait";
- if (ca.c.wait_until(cal, nextdeadline) == cv_status::timeout) {
+ if (ca.c.wait_until(cal, nextdeadline) == std::cv_status::timeout) {
IF_LEVEL(2) LOG << "timeout";
break;
}
switch (check_duplicate_and_update(h.clt_nonce, h.xid, h.xid_rep, b1)) {
case NEW: // new request
- rh.ret = (*f)(forward<unmarshall>(req), rep);
+ rh.ret = (*f)(std::forward<unmarshall>(req), rep);
if (rh.ret == rpc_protocol::unmarshall_args_failure) {
LOG << "failed to unmarshall the arguments. You are "
<< "probably calling RPC 0x" << std::hex << proc << " with the wrong "
memcpy(&a, hp->h_addr_list[0], sizeof(in_addr_t));
dst.sin_addr.s_addr = a.s_addr;
}
- dst.sin_port = hton((in_port_t)stoi(port));
+ dst.sin_port = hton((in_port_t)std::stoi(port));
return dst;
}