Skip to content

Commit

Permalink
Fix build on non-MSVC compilers for Windows platforms (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganDark committed Jun 12, 2023
1 parent c41ed98 commit 43c78f2
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 43c78f2

Please sign in to comment.