diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-04-21 21:28:01 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-04-21 21:28:01 +0000 |
commit | 6ea0e199591352d01c238473018501b45ba05f17 (patch) | |
tree | 46d16ac4e10f5e3bad586366523e7251de4e5312 /sys/netinet | |
parent | c9ad0075c961e68bf98a2a29074b026565d9904e (diff) | |
download | FreeBSD-src-6ea0e199591352d01c238473018501b45ba05f17.zip FreeBSD-src-6ea0e199591352d01c238473018501b45ba05f17.tar.gz |
Work around an egcs optimizer bug (i386). This should fix the active ftp
hang problem. A bug report has been sent to cygnus.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/libalias/alias_util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c index fe07653..cb948c3 100644 --- a/sys/netinet/libalias/alias_util.c +++ b/sys/netinet/libalias/alias_util.c @@ -43,7 +43,8 @@ PacketAliasInternetChecksum(u_short *ptr, int nbytes) if (nbytes == 1) { oddbyte = 0; - *((u_char *) &oddbyte) = *(u_char *) ptr; + ((u_char *) &oddbyte)[0] = *(u_char *) ptr; + ((u_char *) &oddbyte)[1] = 0; sum += oddbyte; } sum = (sum >> 16) + (sum & 0xffff); @@ -84,7 +85,8 @@ TcpChecksum(struct ip *pip) if (nbytes == 1) { oddbyte = 0; - *((u_char *) &oddbyte) = *(u_char *) ptr; + ((u_char *) &oddbyte)[0] = *(u_char *) ptr; + ((u_char *) &oddbyte)[1] = 0; sum += oddbyte; } |