mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 00:35:18 +00:00
Merge pull request #3570 from gufe44/net-sockets-fixes-2.7
[Backport 2.7] NetBSD 9.0 build fixes
This commit is contained in:
commit
30c1df3f84
5
ChangeLog.d/fix-build-netbsd.txt
Normal file
5
ChangeLog.d/fix-build-netbsd.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix building library/net_sockets.c on NetBSD. NetBSD conditionals were
|
||||||
|
added for the backport to avoid the risk of breaking a platform. Original
|
||||||
|
fix contributed by Nia Alarie in #3422. Adopted for long-term support
|
||||||
|
branch 2.7 in #3570.
|
|
@ -335,8 +335,9 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
|
||||||
|
|
||||||
struct sockaddr_storage client_addr;
|
struct sockaddr_storage client_addr;
|
||||||
|
|
||||||
#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
|
#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
|
||||||
defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t)
|
defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t) || \
|
||||||
|
( defined(__NetBSD__) && defined(socklen_t) )
|
||||||
socklen_t n = (socklen_t) sizeof( client_addr );
|
socklen_t n = (socklen_t) sizeof( client_addr );
|
||||||
socklen_t type_len = (socklen_t) sizeof( type );
|
socklen_t type_len = (socklen_t) sizeof( type );
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue