X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=72a7727c403f79762a93bf1342e3b02aa869c27a;hb=52cd43a84bea524033b918b603698104f221bbb7;hp=b675c9765718c26ef9d547ac9d1f5f4cb9dca0ae;hpb=9856f47063c01096fe6649a21be9a021e42a45fe;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index b675c97..72a7727 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -2018,7 +2018,7 @@ ppp_registered(void) int ppp_available(void) { - int s, ok, fd, err; + int s, ok, fd; struct ifreq ifr; int size; int my_version, my_modification, my_patch; @@ -2041,7 +2041,6 @@ int ppp_available(void) close(fd); return 1; } - err = errno; if (kernel_version >= KVERSION(2,3,13)) { error("Couldn't open the /dev/ppp device: %m"); @@ -2148,6 +2147,7 @@ int ppp_available(void) return ok; } +#ifndef HAVE_LOGWTMP /******************************************************************** * * Update the wtmp file with the appropriate user name and tty device. @@ -2221,7 +2221,7 @@ void logwtmp (const char *line, const char *name, const char *host) } #endif } - +#endif /* HAVE_LOGWTMP */ /******************************************************************** * @@ -2233,9 +2233,10 @@ int sifvjcomp (int u, int vjcomp, int cidcomp, int maxcid) u_int x; if (vjcomp) { - if (ioctl(ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) + if (ioctl(ppp_dev_fd, PPPIOCSMAXCID, (caddr_t) &maxcid) < 0) { error("Couldn't set up TCP header compression: %m"); - vjcomp = 0; + vjcomp = 0; + } } x = (vjcomp? SC_COMP_TCP: 0) | (cidcomp? 0: SC_NO_TCP_CCID); @@ -2878,7 +2879,7 @@ ether_to_eui64(eui64_t *p_eui64) /* * And convert the EUI-48 into EUI-64, per RFC 2472 [sec 4.1] */ - ptr = ifr.ifr_hwaddr.sa_data; + ptr = (unsigned char *) ifr.ifr_hwaddr.sa_data; p_eui64->e8[0] = ptr[0] | 0x02; p_eui64->e8[1] = ptr[1]; p_eui64->e8[2] = ptr[2];