pkgsrc/emulators/pearpc/patches/patch-ah

13 lines
598 B
Text

$NetBSD: patch-ah,v 1.1 2007/11/13 18:01:58 joerg Exp $
--- src/tools/crc32.cc.orig 2007-11-13 17:40:47.000000000 +0100
+++ src/tools/crc32.cc
@@ -106,7 +106,7 @@ uint32 ether_crc(size_t len, const byte
uint32 crc = 0xffffffff; // preload shift register, per CRC-32 spec
#ifdef RUN_FASTER
- for (; (((uint32)p)&0x03)!=0 && len>0; len--)
+ for (; (((uintptr_t)p)&0x03)!=0 && len>0; len--)
DO_CRC(*p++); // will execute if *p is not dword aligned
for (; len>=sizeof(uint32); p += sizeof(uint32), len -= sizeof(uint32)) {
uint32 data = *(uint32*)p;