diff --git a/include/zephyr/net/net_ip.h b/include/zephyr/net/net_ip.h index 4be1ea72c6f27..6c78428c1c7b5 100644 --- a/include/zephyr/net/net_ip.h +++ b/include/zephyr/net/net_ip.h @@ -164,7 +164,10 @@ struct in_addr { typedef unsigned short int sa_family_t; /** Length of a socket address */ +#ifndef __socklen_t_defined typedef size_t socklen_t; +#define __socklen_t_defined +#endif /* * Note that the sin_port and sin6_port are in network byte order