Skip to content

Conversation

@jeroen
Copy link
Contributor

@jeroen jeroen commented Feb 25, 2025

Fixes an error with gcc in c23 mode:

gcc  -DNDEBUG -I. -Icommon -Ikms -Iutf8proc -DBSON_COMPILATION -DMONGOC_COMPILATION -DMONGOC_ENABLE_SSL_SECURE_CHANNEL -DMONGOC_ENABLE_CRYPTO_CNG -DKMS_MESSAGE_ENABLE_CRYPTO -DKMS_MESSAGE_ENABLE_CRYPTO_CNG -DMONGOC_HAVE_SASL_CLIENT_DONE -D__USE_MINGW_ANSI_STDIO -DKMS_MESSAGE_LITTLE_ENDIAN -DUTF8PROC_STATIC -DMONGOC_HAVE_BCRYPT_PBKDF2    -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"      -O2 -Wall -std=gnu2x  -mfpmath=sse -msse2 -mstackrealign   -c mongoc/mongoc-secure-channel.c -o mongoc/mongoc-secure-channel.o
mongoc/mongoc-secure-channel.c: In function 'mongoc_secure_channel_setup_certificate_from_file':
mongoc/mongoc-secure-channel.c:67:14: error: incompatible types when returning type '_Bool' but 'PCCERT_CONTEXT' {aka 'const CERT_CONTEXT *'} was expected
   67 |       return false;
      |              ^~~~~
mongoc/mongoc-secure-channel.c:75:14: error: incompatible types when returning type '_Bool' but 'PCCERT_CONTEXT' {aka 'const CERT_CONTEXT *'} was expected
   75 |       return false;
      |              ^~~~~
make: *** [C:/R/etc/x64/Makeconf:289: mongoc/mongoc-secure-channel.o] Error 1

@kevinAlbs kevinAlbs self-requested a review February 25, 2025 18:28
@kevinAlbs kevinAlbs changed the title Fix Windows compilation under C23 CDRIVER-5913 Fix Windows compilation under C23 Feb 25, 2025
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix @jeroen. LGTM.

Related: CI testing for C23 is in progress (CDRIVER-5891).

@kevinAlbs kevinAlbs merged commit 9d50274 into mongodb:master Feb 25, 2025
14 of 15 checks passed
kevinAlbs pushed a commit to kevinAlbs/mongo-c-driver that referenced this pull request Feb 25, 2025
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.

2 participants