1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 07:31:33 +00:00

Use MSVCRT _unlink function (unlink was not setting errno)

This commit is contained in:
dmiller
2014-12-08 18:00:29 +00:00
parent c3579c8b76
commit d7d145d940

View File

@@ -1104,7 +1104,7 @@ static int rename_file(const char *from_filename, const char *to_filename)
/* Windows rename doesn't remove the destination if it exists. */ /* Windows rename doesn't remove the destination if it exists. */
errno = 0; errno = 0;
rc = unlink(to_filename); rc = _unlink(to_filename);
if (rc == -1 && errno != ENOENT) if (rc == -1 && errno != ENOENT)
return -1; return -1;