Skip to content

Commit

Permalink
build: Fix building using system TLS and hiredis
Browse files Browse the repository at this point in the history
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 657229a
  • Loading branch information
guillemj committed Mar 26, 2024
1 parent 0731a05 commit ba6a7bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit ba6a7bc

Please sign in to comment.