Add support for struct sockaddr with no sa_len field.

Lwip's struct sockaddr includes sa_len, but some systems
like Linux doesn't have this filed, which produces many
compilation problems when using external headers.

A set of macros has benn added to detect the absence of
sa_len and adapt sockets.c
This commit is contained in:
Joan Lledó
2019-07-27 18:31:35 +02:00
committed by Simon Goldschmidt
parent c53a8444e8
commit f126750ccd
2 changed files with 58 additions and 9 deletions

View File

@@ -59,6 +59,9 @@
extern "C" {
#endif
/* sockaddr and pals include length fields */
#define _HAVE_SA_LEN 1
/* If your port already typedef's sa_family_t, define SA_FAMILY_T_DEFINED
to prevent this code from redefining it. */
#if !defined(sa_family_t) && !defined(SA_FAMILY_T_DEFINED)