[master] 98b38e9f9 New HAVE_STRUCT_SOCKADDR_SA_LEN macro

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Apr 1 13:26:07 UTC 2020


commit 98b38e9f9d67aac16e0c7da884a45361c572640a
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Apr 1 15:20:59 2020 +0200

    New HAVE_STRUCT_SOCKADDR_SA_LEN macro
    
    Only present if struct sockaddr.sa_len exists, to be checked with
    preprocessor's #ifdef.
    
    Refs #3154

diff --git a/configure.ac b/configure.ac
index dd43dc82f..578d596e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -502,6 +502,11 @@ AM_CONDITIONAL([WITH_PERSISTENT_STORAGE],
 
 AM_MISSING_HAS_RUN
 
+AC_CHECK_MEMBER([struct sockaddr.sa_len],
+	[AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN], [1],
+		[Define if sa_len is present in struct sockaddr])],
+	[], [#include <sys/socket.h>])
+
 AC_CHECK_DECL([SO_ACCEPTFILTER],
     AC_DEFINE(HAVE_ACCEPT_FILTERS,1,[Define to 1 if you have accept filters]),
     ,


More information about the varnish-commit mailing list