Skip to content

[Bug]: 5.8.0 does not compile on Windows, if WOLFSSL_USER_IO is defined #9004

@vaintroub

Description

@vaintroub

Contact Details

No response

Version

5.8.0

Description

It is MariaDB.

We do not use ./configure. We do not use Visual Studio solution. We use (our own) CMake, cross-plattform, and we do define WOLFSSL_USER_IO in the user_settings.h header file, because we already have our own IO level. That fails on Windows since the last release, with errors and warnings like

'INVALID_SOCKET': undeclared identifier
'INVALID_SOCKET': undeclared identifier
'INVALID_SOCKET': undeclared identifier
'INVALID_SOCKET': undeclared identifier
'InetPton' undefined; assuming extern returning int
'htons' undefined; assuming extern returning int
'closesocket' undefined; assuming extern returning int
'AF_INET': undeclared identifier
'AF_INET': undeclared identifier

I see, there is an effort to avoid including winsock.h or winsock2.h, when including windows.h .
If you do this, the above winsock definitions still need to come from some other place. Or else, this code should not be compiled if WOLFSSL_USER_IO is given

Reproduction steps

No response

define WOLFSSL_USER_IO when compiling on Windows

Relevant log output

1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(2876,31): error C2065: 'INVALID_SOCKET': undeclared identifier
1>(compiling source file 'src/ssl.c')
1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(2882,31): error C2065: 'INVALID_SOCKET': undeclared identifier
1>(compiling source file 'src/ssl.c')
1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(3033,37): error C2065: 'INVALID_SOCKET': undeclared identifier
1>(compiling source file 'src/ssl.c')
1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(3033,34): warning C4389: '!=': signed/unsigned mismatch
1>(compiling source file 'src/ssl.c')
1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(3035,21): warning C4013: 'closesocket' undefined; assuming extern returning int
1>(compiling source file 'src/ssl.c')
1>E:\10.6\extra\wolfssl\wolfssl\src\bio.c(3225,28): error C2065: 'INVALID_SOCKET': undeclared identifier

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions