From: Guus Sliepen Date: Fri, 19 Apr 2002 14:06:40 +0000 (+0000) Subject: Support for MaxOS/X. X-Git-Tag: import-tinc-1.1~785^2~295 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=40c2e36a96a3f5c34d4851b30f3561123f3906b5;p=meshlink Support for MaxOS/X. --- diff --git a/acconfig.h b/acconfig.h index 41fdb995..f8e234fd 100644 --- a/acconfig.h +++ b/acconfig.h @@ -75,3 +75,6 @@ /* Define to enable use of old SSLeay_add_all_algorithms() function */ #undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS + +/* Define if there a socklen_t */ +#undef HAVE_SOCKLEN_T diff --git a/configure.in b/configure.in index 2c1fa700..d8b68e4c 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id: configure.in,v 1.13.2.43 2002/03/22 11:43:46 guus Exp $ +dnl $Id: configure.in,v 1.13.2.44 2002/04/19 14:06:40 guus Exp $ AC_INIT(src/tincd.c) AM_INIT_AUTOMAKE(tinc, 1.0-cvs) @@ -42,6 +42,10 @@ case $host_os in AC_DEFINE(HAVE_FREEBSD) [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ] ;; + *darwin*) + AC_DEFINE(HAVE_FREEBSD) + [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ] + ;; *solaris*) AC_DEFINE(HAVE_SOLARIS) [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ] @@ -54,6 +58,9 @@ case $host_os in AC_DEFINE(HAVE_NETBSD) [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ] ;; + *) + AC_MSG_ERROR("Unknown operating system.") + ;; esac AC_CACHE_SAVE @@ -72,6 +79,18 @@ AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM +AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, +[ + AC_TRY_COMPILE( + [#include ], + [socklen_t len = 42; return len;], + ac_cv_type_socklen_t=yes, + ac_cv_type_socklen_t=no) +]) +if test $ac_cv_type_socklen_t == yes; then + AC_DEFINE(HAVE_SOCKLEN_T) +fi + dnl Checks for library functions. AC_FUNC_MEMCMP AC_FUNC_ALLOCA @@ -83,7 +102,6 @@ jm_FUNC_REALLOC AM_GNU_GETTEXT - dnl Support for SunOS AC_CHECK_FUNC(socket, [], [ diff --git a/src/netutl.c b/src/netutl.c index 20d3809d..1e08a9ef 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: netutl.c,v 1.12.4.34 2002/04/05 09:11:38 guus Exp $ + $Id: netutl.c,v 1.12.4.35 2002/04/19 14:06:40 guus Exp $ */ #include "config.h" @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/src/route.c b/src/route.c index dcf43e41..94c3d576 100644 --- a/src/route.c +++ b/src/route.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: route.c,v 1.1.2.37 2002/03/19 00:08:23 guus Exp $ + $Id: route.c,v 1.1.2.38 2002/04/19 14:06:40 guus Exp $ */ #include "config.h" @@ -40,6 +40,7 @@ #include #include #include +#include #include diff --git a/system.h b/system.h index 51adca0b..8006d1a7 100644 --- a/system.h +++ b/system.h @@ -48,5 +48,9 @@ /* Other functions */ #include +#ifndef HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + #endif /* __TINC_SYSTEM_H__ */