1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
$NetBSD: patch-aa,v 1.2 2004/09/28 22:14:04 tv Exp $
--- sredird.c.orig 2002-01-14 05:40:44.000000000 -0500
+++ sredird.c
@@ -82,9 +82,9 @@
#include <fcntl.h>
#include <syslog.h>
#include <termios.h>
-#include <termio.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
@@ -656,10 +656,14 @@ unsigned long int GetPortSpeed(int PortF
return(57600UL);
case B115200:
return(115200UL);
+#ifdef B230400
case B230400:
return(230400UL);
+#endif
+#ifdef B460800
case B460800:
return(460800UL);
+#endif
default:
return(0UL);
}
@@ -1038,9 +1042,11 @@ void SetPortSpeed(int PortFd, unsigned l
case 230400UL:
Speed = B230400;
break;
+#ifdef B460800
case 460800UL:
Speed = B460800;
break;
+#endif
default:
LogMsg(LOG_WARNING,"Unknwon baud rate requested, setting to 9600.");
Speed = B9600;
@@ -1770,7 +1776,8 @@ int main(int argc, char * argv[])
int SockParm;
/* Out buffer ticks count */
- clock_t OutBTicks = times(NULL);
+ struct tms Tms;
+ clock_t OutBTicks = times(&Tms);
/* Out buffer clock ticks limit */
clock_t MaxBTicks;
@@ -1907,10 +1914,10 @@ int main(int argc, char * argv[])
*/
SockParm = IPTOS_LOWDELAY;
setsockopt(STDIN_FILENO,SOL_SOCKET,SO_KEEPALIVE,&SockParmEnable,sizeof(SockParmEnable));
- setsockopt(STDIN_FILENO,SOL_IP,IP_TOS,&SockParm,sizeof(SockParm));
+ setsockopt(STDIN_FILENO,IPPROTO_IP,IP_TOS,&SockParm,sizeof(SockParm));
setsockopt(STDIN_FILENO,SOL_SOCKET,SO_OOBINLINE,&SockParmEnable,sizeof(SockParmEnable));
setsockopt(STDOUT_FILENO,SOL_SOCKET,SO_KEEPALIVE,&SockParmEnable,sizeof(SockParmEnable));
- setsockopt(STDOUT_FILENO,SOL_IP,IP_TOS,&SockParm,sizeof(SockParm));
+ setsockopt(STDOUT_FILENO,IPPROTO_IP,IP_TOS,&SockParm,sizeof(SockParm));
/* Make reads/writes unblocking */
ioctl(STDOUT_FILENO,FIONBIO,&SockParmEnable);
|