diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-09 18:49:24 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:45 +0100 |
commit | adbc664125142c434294bfa795666c90c7608429 (patch) | |
tree | 15db66af5acd4422b5e66678dbe45a953b9dbdb0 /NK_C_API.cc | |
parent | c69604e8ba099b1421af86c34d904b0b380f996c (diff) | |
download | libnitrokey-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.cc | 4 |
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; }); |