about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/rpc-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/rpc-store.cc')
-rw-r--r--third_party/nix/src/libstore/rpc-store.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/rpc-store.cc b/third_party/nix/src/libstore/rpc-store.cc
index 5a0a2c98969a..f0abdd42efa9 100644
--- a/third_party/nix/src/libstore/rpc-store.cc
+++ b/third_party/nix/src/libstore/rpc-store.cc
@@ -15,6 +15,7 @@
 #include <grpcpp/impl/codegen/status.h>
 #include <grpcpp/impl/codegen/sync_stream.h>
 #include <grpcpp/security/credentials.h>
+#include <sys/ucontext.h>
 
 #include "libproto/worker.grpc.pb.h"
 #include "libproto/worker.pb.h"
@@ -355,11 +356,15 @@ void RpcStore::addTempRoot(const Path& path) {
 }
 
 void RpcStore::addIndirectRoot(const Path& path) {
-  throw Unsupported(absl::StrCat("Not implemented ", __func__));
+  ClientContext ctx;
+  google::protobuf::Empty response;
+  SuccessOrThrow(stub_->AddIndirectRoot(&ctx, StorePath(path), &response));
 }
 
 void RpcStore::syncWithGC() {
-  throw Unsupported(absl::StrCat("Not implemented ", __func__));
+  ClientContext ctx;
+  google::protobuf::Empty response;
+  SuccessOrThrow(stub_->SyncWithGC(&ctx, kEmpty, &response));
 }
 
 Roots RpcStore::findRoots(bool censor) {