summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-05-25 07:39:06 +0000
committerpeter <peter@FreeBSD.org>2003-05-25 07:39:06 +0000
commit9a47cfedaa161760fa17eca1844ce525389199b2 (patch)
tree7c8852415a6fcdf63627562e9f42b2a3c50b212d /usr.sbin
parent06e262084666d7dc1751ef238f161960cbdbbc68 (diff)
downloadFreeBSD-src-9a47cfedaa161760fa17eca1844ce525389199b2.zip
FreeBSD-src-9a47cfedaa161760fa17eca1844ce525389199b2.tar.gz
Add a pretty cheesy hack to avoid a gcc-3.2.2 ICE (internal compiler
error) on amd64 when doing pointer subtraction. This bug is already fixed in gcc-3.3 (waiting for after the branch), and the hack will be backed out at the first opportunity. This is in the ipv6 code path. Approved by: re (scottl)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/Makefile5
-rw-r--r--usr.sbin/ppp/ncpaddr.c6
2 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 6c7a681..5d151f4 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -74,6 +74,7 @@ SUBDIR= IPXrouted \
pciconf \
periodic \
pkg_install \
+ ppp \
pppd \
pppstats \
procctl \
@@ -133,10 +134,6 @@ SUBDIR= IPXrouted \
ypset \
zic
-.if ${MACHINE_ARCH} != "amd64"
-SUBDIR+=ppp
-.endif
-
.if !defined(NO_IPFILTER)
SUBDIR+=ipftest \
ipresend \
diff --git a/usr.sbin/ppp/ncpaddr.c b/usr.sbin/ppp/ncpaddr.c
index ea491f1..e4f7084 100644
--- a/usr.sbin/ppp/ncpaddr.c
+++ b/usr.sbin/ppp/ncpaddr.c
@@ -142,16 +142,16 @@ mask62bits(const struct in6_addr *mask)
{
const u_char masks[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
const u_char *c, *p, *end;
- int masklen;
+ int masklen, m;
p = (const u_char *)mask;
for (masklen = 0, end = p + 16; p < end && *p == 0xff; p++)
masklen += 8;
if (p < end) {
- for (c = masks; c < masks + sizeof masks; c++)
+ for (c = masks, m = 0; c < masks + sizeof masks; c++, m++)
if (*c == *p) {
- masklen += c - masks;
+ masklen += m;
break;
}
}
OpenPOWER on IntegriCloud