;;
*freebsd*)
AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
- [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
+ [ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*darwin*)
AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
- [ rm -f src/device.c; ln -sf darwin/device.c src/device.c ]
+ [ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*solaris*)
AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
;;
*openbsd*)
AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
- [ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
+ [ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*netbsd*)
AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
- [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
+ [ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
+ ;;
+ *bsd*)
+ AC_MSG_WARN("Unknown BSD variant, tinc might not compile or work!")
+ AC_DEFINE(HAVE_BSD, 1, [Unknown BSD variant])
+ [ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*cygwin*)
AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
AC_HEADER_STDC
-AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/socket.h sys/wait.h sys/mman.h netdb.h arpa/inet.h])
+AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h sys/uio.h sys/wait.h netdb.h arpa/inet.h])
AC_CHECK_HEADERS([net/if.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h],
[], [], [#include "have.h"]
)
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system unsetenv vsyslog],
+AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system unsetenv vsyslog writev],
[], [], [#include "have.h"]
)
jm_FUNC_MALLOC
#include <sys/param.h>
#endif
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
/* SunOS really wants sys/socket.h BEFORE net/if.h,
and FreeBSD wants these lines below the rest. */
#include <net/if.h>
#endif
+#ifdef HAVE_NET_IF_TUN_H
+#include <net/if_tun.h>
+#endif
+
+#ifdef HAVE_NET_IF_TAP_H
+#include <net/if_tap.h>
+#endif
+
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif