diff mbox series

[1/3] fixup! Provide zlib's uncompress2 from compat/zlib-compat.c

Message ID 20210802190054.58282-2-carenas@gmail.com (mailing list archive)
State New, archived
Headers show
Series hn/reftable "fixes" for OpenBSD | expand

Commit Message

Carlo Marcelo Arenas Belón Aug. 2, 2021, 7 p.m. UTC
124b6e20ef (Provide zlib's uncompress2 from compat/zlib-compat.c,
2021-07-20) adds a compatibility replacement function for uncompress2
that could be used for building with zlib < 1.2.9, but adds it to libgit.

this could result in link failures depending on the library order used
by the link command as shown in (from the 32bit linux CI task for the seen
branch):

  reftable/libreftable.a(block.o): In function `block_reader_init':
  /__w/git/git/reftable/block.c:222: undefined reference to `uncompress2'
  collect2: error: ld returned 1 exit status
  Makefile:2649: recipe for target 'git-daemon' failed

add it instead to the libreftable library that is also the current user.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 94ba729376..d1c2a8acc1 100644
--- a/Makefile
+++ b/Makefile
@@ -1760,7 +1760,7 @@  endif
 
 ifdef NO_UNCOMPRESS2
 	BASIC_CFLAGS += -DNO_UNCOMPRESS2
-	LIB_OBJS += compat/zlib-uncompress2.o
+	REFTABLE_OBJS += compat/zlib-uncompress2.o
 endif
 
 ifdef NO_POSIX_GOODIES