Fix win32, mingw/gcc-8.3 builds

This commit is contained in:
Robin Gareus 2020-03-11 07:20:00 +01:00
parent 7202f3ad28
commit d979c9d09c
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -360,8 +360,12 @@ bool
hard_link (const std::string& existing_file, const std::string& new_path)
{
#ifdef PLATFORM_WINDOWS
# if defined (COMPILER_MINGW) && !defined(_WIN64) && defined(__GNUC__) && __GNUC__ >= 8
return false; // 32bit windows, mingw
# else
/* see also ntfs_link -- msvc only pbd extension */
return CreateHardLinkA (new_path.c_str(), existing_file.c_str(), NULL);
# endif
#else
return 0 == link (existing_file.c_str(), new_path.c_str());
#endif