Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Nov 20, 2023
1 parent cffcaa0 commit 4efef9b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions Sources/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,4 @@
#else
# define ASSERT_MSG(x, fmt, ...) do { } while (false)
# define ASSERT(x) do { } while (false)
#endif

#if defined(DEATH_TARGET_SWITCH)
// `strnlen` is missing in libnx
inline std::size_t strnlen(const char* s, std::size_t maxlen)
{
std::size_t i;
for (i = 0; i < maxlen; i++, s++) {
if (*s == '\0') {
break;
}
}
return i;
}
#endif
2 changes: 1 addition & 1 deletion Sources/Shared/IO/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ namespace Death::IO
return false;
}

# if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
# if !defined(DEATH_TARGET_SWITCH) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L
// As noted in https://eklitzke.org/efficient-file-copying-on-linux, might make the file reading faster
::posix_fadvise(source, 0, 0, POSIX_FADV_SEQUENTIAL);
# endif
Expand Down

0 comments on commit 4efef9b

Please sign in to comment.