changed configure.ac to check the offset of sa_family in struct sockaddr

This commit is contained in:
2018-02-01 09:34:12 +00:00
parent b7e540d6cf
commit 46cd39cabb
5 changed files with 65 additions and 2 deletions

View File

@ -936,6 +936,9 @@
/* Define if mode_t is signed */
#undef QSE_MODE_T_IS_SIGNED
/* offsetof(struct sockaddr, sa_family) */
#undef QSE_OFFSETOF_SA_FAMILY
/* Author */
#undef QSE_PACKAGE_AUTHOR

View File

@ -197,7 +197,13 @@ struct qse_skad_t
/* TODO: is this large enough?? */
union
{
qse_skaf_t family;
struct
{
#if defined(QSE_OFFSETOF_SA_FAMILY) && (QSE_OFFSET_OF_SA_FAMILY > 0)
qse_uint8_t filler[QSE_OFFSETOF_SA_FAMILY];
#endif
qse_skaf_t family;
} sa;
qse_uint8_t data[QSE_SKAD_DATA_SIZE];
} u;