$OpenBSD: patch-mvol_c,v 1.2 2017/04/22 02:14:04 jsg Exp $ - Fix multi-volume format cannot handle on 64bit environment - Add missing includes - Add non-implicit return type to fix build with clang --- mvol.c.orig Sun Jan 7 21:47:17 1996 +++ mvol.c Sat Apr 22 11:59:17 2017 @@ -8,6 +8,7 @@ #include #include #include +#include #ifndef NOINDEX #include #endif @@ -17,8 +18,12 @@ #else #include #endif +#include +#include #include "ish.h" +void restore_done(char *, char *, long); + extern unsigned long fsize; extern unsigned long v_offset; extern unsigned short max_vol; @@ -208,10 +213,8 @@ int m,k; #define COPY_BUF 1024 -restore_done(src, dst,sz) -char *src; -char *dst; -long sz; +void +restore_done(char *src, char *dst, long sz) { int id; int od; @@ -248,7 +251,7 @@ unsigned char *p; } close(id); close(od); - crc32 = ~crc32; + crc32 = ~crc32 & 0xffffffffU; crc16 = ~crc16; if (crc32 == ncrc32 && crc16 == ncrc16) { /* checksum OK */