aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-09 18:49:24 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:45 +0100
commitadbc664125142c434294bfa795666c90c7608429 (patch)
tree15db66af5acd4422b5e66678dbe45a953b9dbdb0 /NK_C_API.cc
parentc69604e8ba099b1421af86c34d904b0b380f996c (diff)
downloadlibnitrokey-adbc664125142c434294bfa795666c90c7608429.tar.gz
libnitrokey-adbc664125142c434294bfa795666c90c7608429.tar.bz2
Adjust for compilation on Visual Studio 2017
Building works however tests are not. Possibly linking with original hidapi solution would work.
Diffstat (limited to 'NK_C_API.cc')
-rw-r--r--NK_C_API.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/NK_C_API.cc b/NK_C_API.cc
index 6d18e52..4e53cd1 100644
--- a/NK_C_API.cc
+++ b/NK_C_API.cc
@@ -169,7 +169,7 @@ extern const char * NK_status() {
auto m = NitrokeyManager::instance();
return get_with_string_result([&](){
string && s = m->get_status_as_string();
- char * rs = strdup(s.c_str());
+ char * rs = _strdup(s.c_str());
clear_string(s);
return rs;
});
@@ -179,7 +179,7 @@ extern const char * NK_device_serial_number(){
auto m = NitrokeyManager::instance();
return get_with_string_result([&](){
string && s = m->get_serial_number();
- char * rs = strdup(s.c_str());
+ char * rs = _strdup(s.c_str());
clear_string(s);
return rs;
});