From ba6a7bcf74262ccc141ea0cd5025353771ebbbad Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 26 Mar 2024 19:38:34 +0100 Subject: [PATCH] build: Fix building using system TLS and hiredis The commit to add support to use the system hiredis entangled the TLS and hiredis system ussage, but while related, the TLS support is not conditional on whether we use the system hiredis. Detangle them so that we link against the system OpenSSL libraries again. Fixes: commit 657229a9ac6e7c9d9820bf74061c1e0a4a12f927 --- src/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 587a265fd..887e5fce6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -359,6 +359,11 @@ else FINAL_CFLAGS+= -I../deps/hiredis FINAL_CXXFLAGS+= -I../deps/hiredis FINAL_LIBS+=../deps/hiredis/libhiredis.a +ifeq ($(BUILD_TLS),yes) + FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a +endif +endif + ifeq ($(BUILD_TLS),yes) FINAL_CFLAGS+=-DUSE_OPENSSL $(OPENSSL_CFLAGS) FINAL_CXXFLAGS+=-DUSE_OPENSSL $(OPENSSL_CXXFLAGS) @@ -375,8 +380,7 @@ ifeq ($(LIBCRYPTO_PKGCONFIG),0) else LIBCRYPTO_LIBS=-lcrypto endif - FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) -endif + FINAL_LIBS += $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) endif ifndef V