Skip to content

Add MinGW build support for the C client - #2456

Open
yeads wants to merge 1 commit into
apache:masterfrom
yeads:add-mingw-build-support
Open

yeads wants to merge 1 commit into
apache:masterfrom
yeads:add-mingw-build-support

Conversation

@yeads

@yeads yeads commented Sep 14, 2026

Copy link
Copy Markdown

Summary

  • distinguish MSVC and MinGW compiler flags in the CMake build
  • make Winsock and IPv6 feature detection work with MinGW-w64, including 32-bit stdcall symbols
  • preserve GCC attributes and POSIX-compatible declarations when compiling with MinGW
  • fix Windows socket handling, timeout configuration, monotonic clock selection, and CLI socket types
  • fix Windows thread-local storage and thread handle management in the pthread compatibility layer
  • document 32-bit and 64-bit MinGW-w64 cross-build commands

Testing

  • built the synchronous client library and CLI with x86_64-w64-mingw32-gcc
  • built the synchronous client library and CLI with i686-w64-mingw32-gcc
  • built the asynchronous client library and CLI with x86_64-w64-mingw32-gcc
  • built with OpenSSL 4.0.1 from /usr/local/mingw in both shared-library and static-library modes
  • verified that the shared build imports libssl-4-x64.dll and that the static build has no OpenSSL DLL dependency
  • repeated MinGW builds with implicit declarations, incompatible pointer types, integer conversions, and missing returns promoted to errors
  • completed a native Linux CMake build as a regression check
  • verified the generated executables as PE32 and PE32+ artifacts

Cyrus SASL was disabled for the cross-build checks because a matching MinGW build was not available in the test environment. Existing defaults and optional feature support remain unchanged.

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