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

correctly detect MINGW #23

Open
oschonrock opened this issue Nov 10, 2024 · 0 comments
Open

correctly detect MINGW #23

oschonrock opened this issue Nov 10, 2024 · 0 comments

Comments

@oschonrock
Copy link

Nice lib, thanks!

compiling as is on mingw fails on finding endian.h because this file does not exist on MINGW.
I propose to widen the _MSC_VER detection at top of sha1.cpp, etc....

as below:

$ git diff
diff --git a/sha1.cpp b/sha1.cpp
index 8331e92..6a4a658 100644
--- a/sha1.cpp
+++ b/sha1.cpp
@@ -7,7 +7,7 @@
 #include "sha1.h"

 // big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__MINGW64__)
 #include <endian.h>
 #endif
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

No branches or pull requests

1 participant