Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on non-MSVC compilers for Windows platforms #94

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rwkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#define _FILE_OFFSET_BITS 64
#define RWKV_MAYBE_BREAK

#ifdef _MSC_BUILD
#include <sys/stat.h>

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#define stat _stat64
#define fstat _fstat64
#define ftell _ftelli64
Expand All @@ -29,7 +31,6 @@
#define RWKV_MAYBE_BREAK __debugbreak()
#endif
#else
#include <sys/stat.h>
#if !defined(__APPLE__)
#define ftell ftello
#define fseek fseeko
Expand Down
Loading