$OpenBSD: patch-mspack_cabd_c,v 1.2 2010/07/31 00:30:27 kevlo Exp $ --- mspack/cabd.c.orig Tue Jul 20 00:39:26 2010 +++ mspack/cabd.c Fri Jul 30 16:20:40 2010 @@ -688,7 +688,7 @@ static int cabd_find(struct mscab_decompressor_p *this /* if off_t is only 32-bits signed, there will be overflow problems * with cabinets reaching past the 2GB barrier (or just claiming to) */ -#ifndef LARGEFILE_SUPPORT + if (sizeof(off_t) <= sizeof(uint32_t)) { if (cablen_u32 & ~0x7FFFFFFF) { sys->message(fh, largefile_msg); cablen_u32 = 0x7FFFFFFF; @@ -697,7 +697,7 @@ static int cabd_find(struct mscab_decompressor_p *this sys->message(fh, largefile_msg); foffset_u32 = 0x7FFFFFFF; } -#endif + } /* copy the unsigned 32-bit offsets to signed off_t variables */ foffset = (off_t) foffset_u32; cablen = (off_t) cablen_u32;