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

Conversation

LoganDark
Copy link
Contributor

@LostRuins was having this issue using mingw to compile rwkv.cpp.

The issue was that mingw doesn't report MSVC defines & doesn't even declare the fstat family of functions unless sys/stat.h is included.

So I moved that include out of the Linux specific section and also tried to detect Windows platforms in general rather than only MSVC.

Maybe this would also fix using MSVC on non-windows platforms, idk. (Does MSVC even exist on other platforms?)

@saharNooby saharNooby merged commit 43c78f2 into RWKV:master Jun 12, 2023
12 checks passed
@LoganDark LoganDark deleted the mingw branch June 12, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants