Skip to content

Fix Windows build with Clang/LLVM toolchain#1885

Open
gamander wants to merge 1 commit into
guanzhi:masterfrom
gamander:fix-windows-clang-build
Open

Fix Windows build with Clang/LLVM toolchain#1885
gamander wants to merge 1 commit into
guanzhi:masterfrom
gamander:fix-windows-clang-build

Conversation

@gamander

@gamander gamander commented May 1, 2026

Copy link
Copy Markdown

This commit fixes compilation errors when building GmSSL on Windows with clang-cl and ninja.

Changes:

  • include/gmssl/endian.h: Add #include <stdint.h> for uint32_t/uint64_t types

  • include/gmssl/kyber.h: Add extern to zeta[] declaration to avoid duplicate symbols

  • src/tls_*.c (6 files): Guard POSIX headers fcntl.h and sys/select.h with #ifndef WIN32, keep errno.h on all platforms

  • CMakeLists.txt: Enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS for MSVC and Clang on Windows, preserving MinGW behavior

This commit fixes compilation errors when building GmSSL on Windows with clang-cl and ninja.

Changes:

- include/gmssl/endian.h: Add #include <stdint.h> for uint32_t/uint64_t types

- include/gmssl/kyber.h: Add extern to zeta[] declaration to avoid duplicate symbols

- src/tls_*.c (6 files): Guard POSIX headers fcntl.h and sys/select.h with #ifndef WIN32, keep errno.h on all platforms

- CMakeLists.txt: Enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS for MSVC and Clang on Windows, preserving MinGW behavior
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