Skip to content

Commit e2abd5d

Browse files
ppisarkontura
authored andcommitted
Fix building zchunk code if zchunk is enabled
Commit 66c99da (Change header files to match a configured ABI regarding a zchunk support) accidentally removed a definition of WITH_ZCHUNK C preprocessor symbol. That symbol controls including zchunk support into the library's code. As a result, librepo library was always missing a zchunk support and ci-dnf-stack "dnf/zchunk.feature:141 using mirror wihtout ranges supports and zchunk results in only two GET requests for primary (the first try is with range specified)" always failed. This fix returns back the macro into CFLAGS.
1 parent 66c99da commit e2abd5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ ENDIF (USE_RUN_GNUPG_USER_SOCKET)
7171

7272
IF (WITH_ZCHUNK)
7373
PKG_CHECK_MODULES(ZCHUNKLIB zck>=0.9.11 REQUIRED)
74+
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWITH_ZCHUNK")
75+
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DWITH_ZCHUNK")
7476
SET (LIBREPO_ZCHUNK_ENABLED "1")
7577
ELSE (WITH_ZCHUNK)
7678
SET (LIBREPO_ZCHUNK_ENABLED "0")

0 commit comments

Comments
 (0)