From 65247c063b36a76dd68156fe17b017c7460d982f Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 28 May 2001 08:21:43 +0000 Subject: [PATCH] Small fixes to allow correct compilation under FreeBSD (tested with 4.3) --- src/net.c | 13 +++++++++---- src/route.c | 8 ++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/net.c b/src/net.c index 4db639c..b0d3cd1 100644 --- a/src/net.c +++ b/src/net.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: net.c,v 1.35.4.108 2001/05/25 11:54:28 guus Exp $ + $Id: net.c,v 1.35.4.109 2001/05/28 08:21:43 guus Exp $ */ #include "config.h" @@ -26,8 +26,10 @@ #include #include #include -#include -#include +#ifndef HAVE_FREEBSD + #include + #include +#endif #include #include #include @@ -383,6 +385,7 @@ cp option = 1; setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)); setsockopt(nfd, SOL_SOCKET, SO_KEEPALIVE, &option, sizeof(option)); +#ifndef HAVE_FREEBSD setsockopt(nfd, SOL_TCP, TCP_NODELAY, &option, sizeof(option)); option = IPTOS_LOWDELAY; @@ -397,6 +400,7 @@ cp return -1; } } +#endif memset(&a, 0, sizeof(a)); a.sin_family = AF_INET; @@ -511,11 +515,12 @@ cp option = 1; setsockopt(cl->meta_socket, SOL_SOCKET, SO_KEEPALIVE, &option, sizeof(option)); +#ifndef HAVE_FREEBSD setsockopt(cl->meta_socket, SOL_TCP, TCP_NODELAY, &option, sizeof(option)); option = IPTOS_LOWDELAY; setsockopt(cl->meta_socket, SOL_IP, IP_TOS, &option, sizeof(option)); - +#endif /* Connect */ a.sin_family = AF_INET; diff --git a/src/route.c b/src/route.c index 3264d56..1b6336d 100644 --- a/src/route.c +++ b/src/route.c @@ -17,12 +17,16 @@ 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.8 2001/05/25 11:54:28 guus Exp $ + $Id: route.c,v 1.1.2.9 2001/05/28 08:21:43 guus Exp $ */ #include "config.h" -#include +#ifdef HAVE_FREEBSD + #include +#else + #include +#endif #include #include #include -- 2.25.1