Well lseek
is defined in unistd.h so the simplest solution would be to add #include <unistd.h>
in pdfium/third_party/zlib_v128/gzlib.c or the gzguts.h header it includes however the developer of zlib states that's not the correct fix; see rejected pull requests https://github.com/madler/zlib/pull/509 and https://github.com/madler/zlib/pull/560.
We have dealt with the same problem in other ports that bundle zlib, like freeimage in #61790.
If there is any option for texmaker to use MacPorts zlib instead of its bundled copy, one would think that would solve this problem, and also confer all of the usual benefits of depending on other MacPorts ports (e.g. getting an up-to-date version: MacPorts has zlib 1.2.13 vs 1.2.8 bundled in texmaker).