diff -ur ucon64-2.2.1-src/src/libdiscmage/ioapi.h ucon64-2.2.1-src.patched/src/libdiscmage/ioapi.h --- ucon64-2.2.1-src/src/libdiscmage/ioapi.h 2016-03-03 22:55:44.000000000 +0900 +++ ucon64-2.2.1-src.patched/src/libdiscmage/ioapi.h 2020-12-02 11:14:01.021081900 +0900 @@ -35,6 +35,11 @@ extern "C" { #endif +// On NetBSD and Gentoo, OF is not defined in zconf.h, which is included by zlib.h. +#ifndef OF +#define OF(x) x +#endif + typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); diff -ur ucon64-2.2.1-src/src/libdiscmage/unzip.h ucon64-2.2.1-src.patched/src/libdiscmage/unzip.h --- ucon64-2.2.1-src/src/libdiscmage/unzip.h 2018-04-21 14:56:06.000000000 +0900 +++ ucon64-2.2.1-src.patched/src/libdiscmage/unzip.h 2020-12-02 11:14:01.028082300 +0900 @@ -49,7 +49,7 @@ extern "C" { #endif -// On NetBSD, OF is not defined in zconf.h, which is included by zlib.h. +// On NetBSD and Gentoo, OF is not defined in zconf.h, which is included by zlib.h. #ifndef OF #define OF(x) x #endif diff -ur ucon64-2.2.1-src/src/misc/ioapi.h ucon64-2.2.1-src.patched/src/misc/ioapi.h --- ucon64-2.2.1-src/src/misc/ioapi.h 2016-03-03 22:55:44.000000000 +0900 +++ ucon64-2.2.1-src.patched/src/misc/ioapi.h 2020-12-02 01:28:22.249437400 +0900 @@ -35,6 +35,11 @@ extern "C" { #endif +// On NetBSD and Gentoo, OF is not defined in zconf.h, which is included by zlib.h. +#ifndef OF +#define OF(x) x +#endif + typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); diff -ur ucon64-2.2.1-src/src/misc/unzip.h ucon64-2.2.1-src.patched/src/misc/unzip.h --- ucon64-2.2.1-src/src/misc/unzip.h 2018-04-21 14:55:52.000000000 +0900 +++ ucon64-2.2.1-src.patched/src/misc/unzip.h 2020-12-02 01:28:25.556626600 +0900 @@ -49,7 +49,7 @@ extern "C" { #endif -// On NetBSD, OF is not defined in zconf.h, which is included by zlib.h. +// On NetBSD and Gentoo, OF is not defined in zconf.h, which is included by zlib.h. #ifndef OF #define OF(x) x #endif