$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 #include #include -#include #include #include +#include #include #include @@ -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);