diff mbox series

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

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

Commit Message

Carlo Marcelo Arenas Belón Aug. 16, 2021, 1:15 a.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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 6014f74a1b..b4f5cc6fc0 100644
--- a/Makefile
+++ b/Makefile
@@ -1739,7 +1739,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