NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/59711 ("#define HAVE_UNISTD_H 1" breaks 32-bit libz)



Synopsis: "#define HAVE_UNISTD_H 1" breaks 32-bit libz

State-Changed-From-To: open->analyzed
State-Changed-By: riastradh%NetBSD.org@localhost
State-Changed-When: Sun, 19 Oct 2025 13:36:21 +0000
State-Changed-Why:
Thanks, what a mess!  Your analysis sounds accurate, including the
endianness dependency.

Since this breaks the _macro_ I don't think there's any way we can
update the _library_ to fix existing binaries.  But we can at least:

1. fix it for new builds in current (and maybe 11) by using `#if 1' and
   a libz major bump,

2. fix it for new builds in _updated_ release branches (9 and 10, but
   maybe we can use (1) for 11) by using `#if 0' and _no_ libz major
   bump so we correctly reflect what the shipped libz.so.1 will do, and

3. fix it for new builds of packages against the x.0 release branches
   (which is what we build our usual binary packages against) by adding

	CPPFLAGS+=	-Dz_off_t=long -Dz_ptrdiff_t=long

   somewhere in pkgsrc's devel/zlib/builtin.mk conditional on
   NetBSD<11.0.





Home | Main Index | Thread Index | Old Index