aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSUZUKI, Shinsuke <suz@kame.net>2006-12-04 15:18:39 +0000
committerBjørn Mork <bjorn@mork.no>2010-08-06 15:37:36 +0200
commitb73261b6f5f0dbb2c0fee2c52278dfbd0ee4aba3 (patch)
tree76254482d4374ed22b5785a9a70bd10045c390fd /configure.in
parent11a1e58f11dfef67d01aebf89232f93f12207bc0 (diff)
introduced a HAVE_SA_LEN macro to support OSes (other than linux) without length field in sockaddr_*
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 19e8d38..1a3c59a 100644
--- a/configure.in
+++ b/configure.in
@@ -187,6 +187,21 @@ if test $tailq_foreach = yes ; then
AC_DEFINE(HAVE_TAILQ_FOREACH_REVERSE_OLD)]);
fi
+dnl Checks for other features
+AC_MSG_CHECKING(if you have a length field in struct sockaddr*)
+AC_CACHE_VAL(ts_cv_sa_len, [dnl
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ], [
+ struct sockaddr a;
+ a.sa_len = 1;
+ ], [ts_cv_sa_len="yes"], [ts_cv_sa_len="no"])])
+AC_MSG_RESULT($ts_cv_sa_len);
+if test "$ts_cv_sa_len" = yes; then
+ AC_DEFINE([HAVE_SA_LEN], 1, [Define to 1 if you have a length field in struct sockaddr])
+fi
+
AC_CHECK_HEADERS(stdarg.h)
AC_OUTPUT(Makefile)