From: Guus Sliepen Date: Wed, 15 Nov 2000 13:33:27 +0000 (+0000) Subject: Porting to FreeBSD: X-Git-Tag: release-1.0pre4~176 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=e118ba0a648000c48d6a401c9b9249a844d6dbcf;p=tinc Porting to FreeBSD: - Reorganized and added some #includes --- diff --git a/src/Makefile.am b/src/Makefile.am index 7ef3ab3b..a1ec3523 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,11 +1,11 @@ ## Produce this file with automake to get Makefile.in -# $Id: Makefile.am,v 1.4.4.5 2000/11/02 21:26:51 zarq Exp $ +# $Id: Makefile.am,v 1.4.4.6 2000/11/15 13:33:25 guus Exp $ sbin_PROGRAMS = tincd tincd_SOURCES = conf.c connlist.c meta.c net.c netutl.c protocol.c subnet.c tincd.c -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/lib -I$(top_srcdir)/intl +INCLUDES = @INCLUDES@ -I$(top_builddir) -I$(top_srcdir)/lib -I$(top_srcdir)/intl noinst_HEADERS = conf.h connlist.h meta.h net.h netutl.h protocol.h subnet.h diff --git a/src/meta.c b/src/meta.c index eb005fdf..a4cfc838 100644 --- a/src/meta.c +++ b/src/meta.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: meta.c,v 1.1.2.10 2000/11/15 01:06:10 zarq Exp $ + $Id: meta.c,v 1.1.2.11 2000/11/15 13:33:25 guus Exp $ */ #include "config.h" @@ -26,9 +26,10 @@ #include #include #include -#include #include #include +/* This line must be below the rest for FreeBSD */ +#include #ifdef HAVE_OPENSSL_EVP_H # include diff --git a/src/net.c b/src/net.c index 09d98f41..e7297d19 100644 --- a/src/net.c +++ b/src/net.c @@ -17,17 +17,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.72 2000/11/15 01:28:21 zarq Exp $ + $Id: net.c,v 1.35.4.73 2000/11/15 13:33:26 guus Exp $ */ #include "config.h" -#include #include #include -/* SunOS really wants sys/socket.h BEFORE net/if.h */ -#include -#include #include #include #include @@ -39,6 +35,11 @@ #include #include #include +/* SunOS really wants sys/socket.h BEFORE net/if.h, + and FreeBSD wants these lines below the rest. */ +#include +#include +#include #ifdef HAVE_OPENSSL_RAND_H # include @@ -1097,7 +1098,7 @@ conn_list_t *create_new_connection(int sfd) cp p = new_conn_list(); - if(getpeername(sfd, &ci, &len) < 0) + if(getpeername(sfd, (struct sockaddr *) &ci, (socklen_t *) &len) < 0) { syslog(LOG_ERR, _("System call `%s' failed: %m"), "getpeername"); diff --git a/src/protocol.c b/src/protocol.c index fbb0abf3..dfb6ad97 100644 --- a/src/protocol.c +++ b/src/protocol.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: protocol.c,v 1.28.4.60 2000/11/15 01:06:11 zarq Exp $ + $Id: protocol.c,v 1.28.4.61 2000/11/15 13:33:27 guus Exp $ */ #include "config.h" @@ -30,6 +30,7 @@ #include #include #include +#include #include #include