mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-27 23:37:08 +00:00
Merge pull request #3422 from niacat/net-sockets-fixes
NetBSD 9.0 build fixes
This commit is contained in:
commit
e81dc00df4
2
ChangeLog.d/bugfix_PR3422.txt
Normal file
2
ChangeLog.d/bugfix_PR3422.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix building library/net_sockets.c and the ssl_mail_client program on NetBSD. Contributed by Nia Alarie in #3422.
|
@ -23,6 +23,7 @@
|
|||||||
* be set before config.h, which pulls in glibc's features.h indirectly.
|
* be set before config.h, which pulls in glibc's features.h indirectly.
|
||||||
* Harmless on other platforms. */
|
* Harmless on other platforms. */
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
#define _XOPEN_SOURCE 600 /* sockaddr_storage */
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "mbedtls/config.h"
|
#include "mbedtls/config.h"
|
||||||
@ -322,7 +323,8 @@ 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(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
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
* be set before config.h, which pulls in glibc's features.h indirectly.
|
* be set before config.h, which pulls in glibc's features.h indirectly.
|
||||||
* Harmless on other platforms. */
|
* Harmless on other platforms. */
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
#define _XOPEN_SOURCE 600
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "mbedtls/config.h"
|
#include "mbedtls/config.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user