Skip to content
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

[Bug]: syntax errors when compiling on Windows with QUIC enabled #7125

Closed
farazrbx opened this issue Jan 10, 2024 · 2 comments
Closed

[Bug]: syntax errors when compiling on Windows with QUIC enabled #7125

farazrbx opened this issue Jan 10, 2024 · 2 comments
Assignees
Labels

Comments

@farazrbx
Copy link
Contributor

Contact Details

No response

Version

wolfSSL Release 5.6.6

Description

Build fails on windows using msvc with some syntax errors when quic is enabled.
To fix it, I had to add #include <stdint.h> in quic.h for uint8_t
And define #define STDERR_FILENO 2 in api.c

Reproduction steps

mkdir build
cd build
cmake -DWOLFSSL_QUIC=yes ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.37.32825.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
...

cmake --build .
```

### Relevant log output

```shell
C:\git\wolfssl-5.6.6\wolfssl\quic.h:60: error: C2143: syntax error: missing ')' before '*'
C:\git\wolfssl-5.6.6\wolfssl\quic.h:60: error: C2143: syntax error: missing ';' before '*'
C:\git\wolfssl-5.6.6\wolfssl\quic.h:60: error: C2059: syntax error: '*'
C:\git\wolfssl-5.6.6\wolfssl\quic.h:62: error: C2059: syntax error: ')'
C:\git\wolfssl-5.6.6\wolfssl\quic.h:68: error: C2143: syntax error: missing ')' before '*'
C:\git\wolfssl-5.6.6\wolfssl\quic.h:68: error: C2143: syntax error: missing '{' before '*'
...

C:\git\wolfssl-5.6.6\tests\api.c:56577: error: Use of undeclared identifier 'STDERR_FILENO'
C:\git\wolfssl-5.6.6\tests\api.c:56638: error: Use of undeclared identifier 'STDERR_FILENO'
```
@farazrbx farazrbx added the bug label Jan 10, 2024
@farazrbx
Copy link
Contributor Author

farazrbx commented Mar 1, 2024

Fixed by #7072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants