From 9a47cfedaa161760fa17eca1844ce525389199b2 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 25 May 2003 07:39:06 +0000 Subject: 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) --- usr.sbin/Makefile | 5 +---- usr.sbin/ppp/ncpaddr.c | 6 +++--- 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; } } -- cgit v1.1