Skip to content

Commit

Permalink
fix compile error on POSIX
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Sep 18, 2021
1 parent d0493ec commit 722da75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/MemoryFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static bool tryAtomicRename(const MMKVPath_t &srcPath, const MMKVPath_t &dstPath
if (g_renameat2) {
renamed = (g_renameat2(AT_FDCWD, srcPath.c_str(), AT_FDCWD, dstPath.c_str(), RENAME_EXCHANGE) == 0);
}
#else
#elif defined(SYS_renameat2)
renamed = (::syscall(SYS_renameat2, AT_FDCWD, srcPath.c_str(), AT_FDCWD, dstPath.c_str(), RENAME_EXCHANGE) == 0);
#endif
if (!renamed && errno != ENOENT) {
Expand Down

0 comments on commit 722da75

Please sign in to comment.