summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-03-26 16:01:07 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-04-07 11:18:57 +0200
commit4e884615d1702914c1ec4c182f94eb9b8efc7a16 (patch)
tree468e2c2aa5257fd26bfb1a83cff2e3364b2f5edb /configure.ac
parent464a019cbe028f1e0a85a6bd4631e41411b0d32d (diff)
downloadcurl-4e884615d1702914c1ec4c182f94eb9b8efc7a16.tar.gz
configure: detect sa_family_t
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 798fa5f1e..d1c1a8f93 100755
--- a/configure.ac
+++ b/configure.ac
@@ -3492,6 +3492,26 @@ AC_CHECK_TYPE([bool],[
#endif
])
+# check for sa_family_t
+AC_CHECK_TYPE(sa_family_t,
+ AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
+ [
+ # The windows name?
+ AC_CHECK_TYPE(ADDRESS_FAMILY,
+ AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
+ AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
+ [
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+ ])
+ ],
+[
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+])
+
AC_MSG_CHECKING([if time_t is unsigned])
AC_RUN_IFELSE([
AC_LANG_SOURCE([[