projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e959ee
)
Small fixes to allow correct compilation under FreeBSD (tested with 4.3)
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 28 May 2001 08:21:43 +0000
(08:21 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 28 May 2001 08:21:43 +0000
(08:21 +0000)
src/net.c
patch
|
blob
|
history
src/route.c
patch
|
blob
|
history
diff --git
a/src/net.c
b/src/net.c
index
4db639c
..
b0d3cd1
100644
(file)
--- 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.
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.10
8 2001/05/25 11:54:28
guus Exp $
+ $Id: net.c,v 1.35.4.10
9 2001/05/28 08:21:43
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-26,8
+26,10
@@
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
+#ifndef HAVE_FREEBSD
+ #include <netinet/ip.h>
+ #include <netinet/tcp.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-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));
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;
setsockopt(nfd, SOL_TCP, TCP_NODELAY, &option, sizeof(option));
option = IPTOS_LOWDELAY;
@@
-397,6
+400,7
@@
cp
return -1;
}
}
return -1;
}
}
+#endif
memset(&a, 0, sizeof(a));
a.sin_family = AF_INET;
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));
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));
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;
/* Connect */
a.sin_family = AF_INET;
diff --git
a/src/route.c
b/src/route.c
index
3264d56
..
1b6336d
100644
(file)
--- 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.
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 "config.h"
-#include <netinet/in.h>
+#ifdef HAVE_FREEBSD
+ #include <sys/param.h>
+#else
+ #include <netinet/in.h>
+#endif
#include <utils.h>
#include <xalloc.h>
#include <syslog.h>
#include <utils.h>
#include <xalloc.h>
#include <syslog.h>