Check for sockaddr_in.sin_len.

If found, set SOCK_HAS_LEN which is used in addr.c.  Should fix keyscan
tests on platforms with this (eg old NetBSD).
This commit is contained in:
Darren Tucker 2022-11-02 10:51:48 +11:00
parent a1febadf42
commit 5ebe18cab6
No known key found for this signature in database
1 changed files with 10 additions and 0 deletions

View File

@ -4325,6 +4325,16 @@ AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE([__res_state], [sta
#include <resolv.h>
]])
AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
[AC_DEFINE([SOCK_HAS_LEN], [1], [sockaddr_in has sin_len])],
[],
[AC_LANG_SOURCE([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
]])]
)
AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
ac_cv_have_ss_family_in_struct_ss, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[