Merge pull request #3639 from okhowang/android

Use socklen_t on Android
This commit is contained in:
Janos Follath 2020-10-02 13:22:59 +01:00 committed by GitHub
commit 7f007f70e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* Use socklen_t on Android and other POSIX-compliant system

View File

@ -318,7 +318,7 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t) || \
defined(socklen_t)
defined(socklen_t) || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L)
socklen_t n = (socklen_t) sizeof( client_addr );
socklen_t type_len = (socklen_t) sizeof( type );
#else