]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-svr4.c
misc fixes
[ppp.git] / pppd / sys-svr4.c
index a8d80b91ba5f5e6a8339e2c76cc81802d0377171..64ad5f94a4c0867c2fa224ab21772cc15b9ded91 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-svr4.c,v 1.29 1999/03/22 05:55:39 paulus Exp $";
+static char rcsid[] = "$Id: sys-svr4.c,v 1.31 1999/06/24 00:18:41 paulus Exp $";
 #endif
 
 #include <limits.h>
@@ -60,10 +60,12 @@ static char rcsid[] = "$Id: sys-svr4.c,v 1.29 1999/03/22 05:55:39 paulus Exp $";
 #include <net/ppp_defs.h>
 #include <net/pppio.h>
 #include <netinet/in.h>
+#ifdef SOL2
 #include <sys/tihdr.h>
 #include <sys/tiuser.h>
 #include <inet/common.h>
 #include <inet/mib2.h>
+#endif
 
 #include "pppd.h"
 
@@ -222,7 +224,7 @@ sys_check_options()
     return 1;
 }
 
-
+#if 0
 /*
  * daemon - Detach us from controlling terminal session.
  */
@@ -246,6 +248,7 @@ daemon(nochdir, noclose)
     }
     return 0;
 }
+#endif
 
 /*
  * ppp_available - check whether the system has any ppp interfaces
@@ -453,6 +456,9 @@ struct speed {
 #ifdef B57600
     { 57600, B57600 },
 #endif
+#ifdef B76800
+    { 76800, B76800 },
+#endif
 #ifdef B115200
     { 115200, B115200 },
 #endif
@@ -1610,9 +1616,9 @@ logwtmp(line, name, host)
 
     if (name[0] != 0) {
        /* logging in */
-       strlcpy(utmpx.ut_user, name, sizeof(utmpx.ut_user));
-       strlcpy(utmpx.ut_id, ifname, sizeof(utmpx.ut_id));
-       strlcpy(utmpx.ut_line, line, sizeof(utmpx.ut_line));
+       strncpy(utmpx.ut_user, name, sizeof(utmpx.ut_user));
+       strncpy(utmpx.ut_id, ifname, sizeof(utmpx.ut_id));
+       strncpy(utmpx.ut_line, line, sizeof(utmpx.ut_line));
        utmpx.ut_pid = getpid();
        utmpx.ut_type = USER_PROCESS;
     } else {
@@ -1656,6 +1662,7 @@ strioctl(fd, cmd, ptr, ilen, olen)
     return 0;
 }
 
+#if 0
 /*
  * lock - create a lock file for the named lock device
  */
@@ -1733,7 +1740,7 @@ unlock()
        lock_file[0] = 0;
     }
 }
-
+#endif
 
 /*
  * cifroute - delete a route through the addresses given.
@@ -1775,6 +1782,7 @@ int
 have_route_to(addr)
     u_int32_t addr;
 {
+#ifdef SOL2
     int fd, r, flags, i;
     struct {
        struct T_optmgmt_req req;
@@ -1865,6 +1873,9 @@ have_route_to(addr)
     }
     close(fd);
     return 0;
+#else
+    return -1;
+#endif /* SOL2 */
 }
 
 /*