I've removed the Makefile stuff, the _POSIX_SOURCE check is unneeded since it errors out inside unistd.h anyway. I hope its all fine, thanks! Em qua., 27 de mai. de 2020 às 19:43, escreveu: > > > Today people asked me to resubmit the zlib patches that I had sent > > months ago due to netsurf/nsfb. I actually had things working and > > clean on my system since back then, but I was confused between a > > decision of sending the build "half-broken" but with the final result > > working, or triggering a flag up that I didn't know if it should or > > not, after looking up, it seems the cleaner route is just to do the > > latter. > > > > the newer zlib uses lseek/open/write, functions specified in > > , but it actually doesn't include the header when building > > some of the .$O, what happened it was just that our linker would spot > > the functions even after the compiler warning due to the lax > > prototypeless functions in ANSI C std and build it fine. (the -B flag > > on 2c would do it) > > > > the option I'm going here is just to make it include , that > > requires anything that uses ape/zlib to define _POSIX_SOURCE > > To prevent someone else from making the same error, we can do something > like > > #ifndef _POSIX_SOURCE > #error zlib requires _POSIX_SOURCE to be defined > #endif > > in zlib.h > > > all tests I've done points out it is working fine, page works, the zlib > > tests passes and netsurf png decoding work as always with it. > > > +++ b/sys/src/cmd/gs/zlib/Makefile.in Wed May 27 17:39:37 2020 -0300 > > @@ -1,11 +1,11 @@ > > +++ b/sys/src/cmd/gs/zlib/configure Wed May 27 17:39:37 2020 -0300 > > @@ -1,443 +1,921 @@ > > We can probably get rid of these files -- they're not useful. > > Will look a bit deeper later, but other than that, the patch looks > big and hard to review to me, since it's such a big hump in versions. > > It's also widely used upstream code, so.. *shrug*, it's probably ok. >