fix(arch): Replacement of the custom AF_INET definition with the appropriate platform-specific network header

This commit is contained in:
Noel Graf 2025-04-15 20:05:50 +02:00 committed by Julius Pfrommer
parent d618990e5a
commit 7c81bb2053
3 changed files with 6 additions and 5 deletions

View File

@ -29,9 +29,6 @@
#include <errno.h>
#include <string.h>
#define AF_INET 2
#define AF_INET6 10
static int hexval(unsigned c)
{
if (c-'0'<10) return c-'0';

View File

@ -29,6 +29,12 @@
#include <open62541/types.h>
#ifdef _WIN32
#include <winsock2.h> /* AF_INET */
#else
#include <sys/socket.h> /* AF_INET */
#endif
int musl_inet_pton(int af, const char * UA_RESTRICT s, void * UA_RESTRICT a0);
#endif /* MUSL_INET_PTON_H */

View File

@ -26,8 +26,6 @@
#define SET_OID(x, oid) \
do { x.len = MBEDTLS_OID_SIZE(oid); x.p = (unsigned char *) oid; } while (0)
#define AF_INET 2
typedef struct mbedtls_write_san_node{
int type;
char* host;