Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile errors in the server and client. #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CXX_STD = CXX11
PKG_LIBS = `pkg-config --libs grpc`
PKG_CFLAGS = `pkg-config --cflags grpc`
PKG_CXXFLAGS = `pkg-config --cflags grpc`

8 changes: 4 additions & 4 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ RawVector fetch(CharacterVector server, CharacterVector method, RawVector reques
grpc_metadata meta_c[metadata_length];

for(int i = 0; i < metadata_length; i++) {
meta_c[i] = {grpc_slice_from_static_string(metadata[i * 2]),
grpc_slice_from_static_string(metadata[i * 2 + 1]),
0,
{{nullptr, nullptr, nullptr, nullptr}}};
meta_c[i] = grpc_metadata{
grpc_slice_from_static_string(metadata[i * 2]),
grpc_slice_from_static_string(metadata[i * 2 + 1]),
0, {}};
}

grpc_metadata_array initial_metadata_recv;
Expand Down
6 changes: 5 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#include <Rcpp.h>
// undef the Free macro defined by Rcpp as it is redfined by absl later.
#ifdef Free
#undef Free
#endif
#include <grpc/grpc.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
#include "common.h"
Expand All @@ -7,7 +11,7 @@

using namespace Rcpp;

#include <grpc++/grpc++.h>
#include <grpcpp/grpcpp.h>
using grpc::Status;
using grpc::StatusCode;

Expand Down