diff --git a/c/opendht.cpp b/c/opendht.cpp index e5150315d59af69e3f6c6650902e9a079fa1746a..1f64268874630c222d022cf10689e3c503fb84f0 100644 --- a/c/opendht.cpp +++ b/c/opendht.cpp @@ -32,6 +32,11 @@ extern "C" { #include <errno.h> +const char* dht_version() +{ + return dht::version(); +} + // dht::InfoHash inline dht_infohash dht_infohash_to_c(const dht::InfoHash& h) { diff --git a/c/opendht_c.h b/c/opendht_c.h index a29c2102c8dd6deb532e0a2df4e48de5b3467d3a..7569c3bad6430f5c76ca28673305acc6030befe1 100644 --- a/c/opendht_c.h +++ b/c/opendht_c.h @@ -36,6 +36,8 @@ struct OPENDHT_C_PUBLIC dht_data_view { }; typedef struct dht_data_view dht_data_view; +OPENDHT_C_PUBLIC const char* dht_version(); + // dht::Blob struct OPENDHT_C_PUBLIC dht_blob; typedef struct dht_blob dht_blob;