-
-
Notifications
You must be signed in to change notification settings - Fork 618
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 some build issues with mingw #1680
Conversation
This fixes conflict of pollfd structure declaration with winsock2.h header file
Please follow the PR format provided. |
May resolve #1675 |
Please take a look at that patch, that is used in conan-center: |
Warnings are: * Check _MSC_VER for MSVC specific pragma directive. * Use lowercase header names for case sensitive file system. * GetFileAttributesW returns DWORD type instead of int.
I am not familiar with that project and never used it.
This pull request does not change any linking commands. That patch file in conano-io adds
Without that change, this error is shown in mingw gcc: In file included from ../../contrib/curl/lib/connect.c:64:
../../contrib/curl/lib/select.h:48:8: error: redefinition of 'struct pollfd'
48 | struct pollfd
| ^~~~~~
In file included from ../../contrib/curl/lib/curl_setup.h:273,
from ../../contrib/curl/lib/connect.c:23:
x86_64-w64-mingw32/include/winsock2.h:1185:16: note: originally defined here
1185 | typedef struct pollfd {
| ^~~~~~ BTW, I am building premake5 using this recipe msys2/MINGW-packages#9245. Feel free to comment on any mistake there. |
So based on comments, I think the course of action is to have curl updated in one commit, then fix the build issues in a follow on commit, then submit that as a single PR. |
Updating curl would be a huge change and out of scope of this pull request. I have edited curl in separate commit here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to go ahead and approve this as is. I agree that it would be better to update Curl (and disagree that it is a "a huge change and out of scope of this pull request"), but the changes are fairly small and self-contained. If it buys us better MingGW support in the meantime it feels worth it. I'll hold off on merging for a bit though in case someone else wants to object.
I'll go ahead and approve, but I'll write an issue for updating curl so this isn't lost. |
Just gonna poke on this @starkos |
Thanks for the contribution! |
What does this PR do?
Fixes some build issues with mingw
How does this PR change Premake's behavior?
None.
Are there any breaking changes? Will any existing behavior change?
Nope.
Anything else we should know?
Don't know what to add here.
Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!