From 3ef3eaa27e5ccdc9506886497667c73e822750c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Oct 2023 15:10:55 +0200 Subject: [PATCH] base64: also build for curl Since the tool itself now uses the base64 code using the curlx way, it needs to build also when the tool needs it. Starting now, the tool build defines BULDING_CURL to allow lib-side code to use it. Follow-up to 2e160c9c6525 Closes #12010 --- lib/base64.c | 2 +- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base64.c b/lib/base64.c index 30db7e5889..2a49b5acd6 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -31,7 +31,7 @@ !defined(CURL_DISABLE_SMTP) || \ !defined(CURL_DISABLE_POP3) || \ !defined(CURL_DISABLE_IMAP) || \ - !defined(CURL_DISABLE_DOH) || defined(USE_SSL) + !defined(CURL_DISABLE_DOH) || defined(USE_SSL) || defined(BUILDING_CURL) #include "curl/curl.h" #include "warnless.h" #include "curl_base64.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6517c7036..a3c4218eaf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,6 +22,7 @@ # ########################################################################### set(EXE_NAME curl) +add_definitions(-DBUILDING_CURL) if(USE_MANUAL) # Use the C locale to ensure that only ASCII characters appear in the diff --git a/src/Makefile.am b/src/Makefile.am index ed2df5ef57..ddeb70073a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,6 +50,7 @@ SUBDIRS = ../docs if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif +AM_CPPFLAGS += -DBUILDING_CURL include Makefile.inc -- 2.47.2