Skip to content

Commit

Permalink
rdma_van: fallback to c++11
Browse files Browse the repository at this point in the history
  • Loading branch information
changlan committed Jul 16, 2019
1 parent 36ffec9 commit d7481c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PROTOC = ${DEPS_PATH}/bin/protoc
endif

INCPATH = -I./src -I./include -I$(DEPS_PATH)/include
CFLAGS = -std=c++14 -msse2 -fPIC -O3 -ggdb -Wall -finline-functions $(INCPATH) $(ADD_CFLAGS)
CFLAGS = -std=c++11 -msse2 -fPIC -O3 -ggdb -Wall -finline-functions $(INCPATH) $(ADD_CFLAGS)
LIBS = -pthread

ifdef USE_RDMA
Expand Down Expand Up @@ -50,7 +50,7 @@ build/libps.a: $(OBJS)

build/%.o: src/%.cc ${ZMQ} src/meta.pb.h
@mkdir -p $(@D)
$(CXX) $(INCPATH) -std=c++14 -MM -MT build/$*.o $< >build/$*.d
$(CXX) $(INCPATH) -std=c++11 -MM -MT build/$*.o $< >build/$*.d
$(CXX) $(CFLAGS) $(LIBS) -c $< -o $@

src/%.pb.cc src/%.pb.h : src/%.proto ${PROTOBUF}
Expand Down
8 changes: 4 additions & 4 deletions src/rdma_van.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class RDMAVan : public Van {
}

Endpoint *endpoint;
endpoints_[node.id] = std::make_unique<Endpoint>();
endpoints_[node.id] = std::unique_ptr<Endpoint>(new Endpoint());
endpoint = endpoints_[node.id].get();

endpoint->SetNodeID(node.id);
Expand Down Expand Up @@ -725,8 +725,8 @@ class RDMAVan : public Van {
std::tuple<Endpoint *, BufferContext *> notification;
recv_buffers_.WaitAndPop(&notification);

Endpoint *endpoint = std::get<Endpoint *>(notification);
BufferContext *buffer_ctx = std::get<BufferContext *>(notification);
Endpoint *endpoint = std::get<0>(notification);
BufferContext *buffer_ctx = std::get<1>(notification);

int total_len = 0;

Expand Down Expand Up @@ -1042,7 +1042,7 @@ class RDMAVan : public Van {
const RequestContext *remote_ctx = reinterpret_cast<const RequestContext *>(
event->param.conn.private_data);

const auto r = incoming_.emplace(std::make_unique<Endpoint>());
const auto r = incoming_.emplace(std::unique_ptr<Endpoint>(new Endpoint()));
Endpoint *endpoint = r.first->get();
endpoint->SetNodeID(remote_ctx->node);
endpoint->cm_id = id;
Expand Down

0 comments on commit d7481c1

Please sign in to comment.