Skip to content

build: Compilation fixes for MinGW toolchain #374

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ManManson
Copy link

@ManManson ManManson commented Apr 27, 2025

This changeset incorporates a few fixes for build errors and warnings found when building GNS via llvm-mingw toolchain:

  • TraceLoggingProvider: Disable for MinGW builds (MinGW-provided winapi headers differ from original WinSDK headers a lot, which poses a problem when trying to compile TraceLoggingProvider code)
  • build: Fix compilation errors for cmsghdr-related things in MinGW builds (MinGW requires to include a different header file + need to alias WSACMSGHDR* to CMSGHDR/cmsghdr to avoid compilation errors)
  • SteamNetworkingIPAddr: fix potentially dangerous -wcast-align warning in IsIPv6AllZeroes()

There are no `TraceLoggerProvider.h` or `winmeta.h` headers
in MinGW w32api package, so just disable the support for
TraceLoggerProvider interfaces.

Signed-off-by: Pavel Solodovnikov <[email protected]>
…ng in `IsIPv6AllZeroes()`

C-style cast from `uint8*` to `uint64*` is unsafe and can blow up
in cases when the source pointer is not aligned to `uint64` type
requirements.

Signed-off-by: Pavel Solodovnikov <[email protected]>
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.

1 participant