mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
clang does not like _strdup
This commit is contained in:
@@ -30,12 +30,16 @@ static inline StringOption to_bridgestring_opt(const char* psz) {
|
||||
}
|
||||
|
||||
static inline void allocate_string(::rust::String& str, char** ppsz) {
|
||||
#ifdef _WIN32
|
||||
*ppsz = _strdup(str.c_str());
|
||||
#else
|
||||
*ppsz = strdup(str.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void allocate_string_opt(StringOption str, char** ppsz) {
|
||||
if (str.has_data) {
|
||||
*ppsz = _strdup(str.data.c_str());
|
||||
allocate_string(str.data, ppsz);
|
||||
} else {
|
||||
*ppsz = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user