Skip to content

Commit

Permalink
Merge pull request #3570 from gufe44/net-sockets-fixes-2.7
Browse files Browse the repository at this point in the history
[Backport 2.7] NetBSD 9.0 build fixes
  • Loading branch information
mpg authored Aug 18, 2020
2 parents 52df1cc + 3ca3b9e commit 30c1df3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.d/fix-build-netbsd.txt
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 3 additions & 2 deletions library/net_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,

struct sockaddr_storage client_addr;

#if defined(__socklen_t_defined) || defined(_SOCKLEN_T) || \
defined(_SOCKLEN_T_DECLARED) || defined(__DEFINED_socklen_t)
#if defined(__socklen_t_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 type_len = (socklen_t) sizeof( type );
#else
Expand Down

0 comments on commit 30c1df3

Please sign in to comment.