From 536f30ec84cb02ee6521735843d023c987ac812f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Thu, 21 Oct 2021 11:54:02 -0400
Subject: [PATCH] opendht.cpp: fix build

---
 c/opendht.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/opendht.cpp b/c/opendht.cpp
index 282bc5d9..ad885153 100644
--- a/c/opendht.cpp
+++ b/c/opendht.cpp
@@ -173,7 +173,7 @@ int dht_privatekey_export(const dht_privatekey* k, char* out, size_t* out_size,
 
 dht_publickey* dht_privatekey_get_publickey(const dht_privatekey* k) {
     const auto& key = *reinterpret_cast<const PrivkeySp*>(k);
-    return reinterpret_cast<dht_publickey*>(new PubkeySp(std::make_shared<dht::crypto::PublicKey>(key->getPublicKey())));
+    return reinterpret_cast<dht_publickey*>(new PubkeySp(key->getSharedPublicKey()));
 }
 
 void dht_privatekey_delete(dht_privatekey* pk) {
-- 
GitLab