./configure && make results in:
In file included from zutil.c:10:
In file included from ./gzguts.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
318 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
| ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
147 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
I think this is due to Xcode's clang now having https://github.com/llvm/llvm-project/pull/74676 which requires https://github.com/llvm/llvm-project/pull/74676 which I think is part of zlib 1.3.1, but optipng's hermetic zlib is still at 1.3. So just bumping the version, or cherry-picking that PR probably does the trick.
Thanks, Nico. Version 0.7.9 should have done the trick, but that one was an oopsie.
So I just uploaded version [sic] 7.9.1.
Fixed in v7.9.1.