From 5af6950ac4bed17563e37fdd6d64bfd8cd255341 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Wed, 11 Dec 2024 19:10:00 +0100 Subject: [PATCH] Ensure use_ssl is set when using --disable-ssl. Fixes linker failure: ``` Undefined symbols for architecture x86_64: "_use_ssl", referenced from: _process_arguments in nrpe-4fa9f6.o _handle_connection in nrpe-4fa9f6.o _read_packet in nrpe-4fa9f6.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` --- src/check_nrpe.c | 3 +++ src/nrpe.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/check_nrpe.c b/src/check_nrpe.c index 8b53f60..2f0490e 100644 --- a/src/check_nrpe.c +++ b/src/check_nrpe.c @@ -77,7 +77,10 @@ extern char *log_file; #ifdef HAVE_SSL SSL *ssl; +int use_ssl = TRUE; unsigned long ssl_opts = SSL_OP_ALL; +#else +int use_ssl = FALSE; #endif int have_log_opts = FALSE; SslParms sslprm = { diff --git a/src/nrpe.c b/src/nrpe.c index aa2aa6b..2032ff4 100644 --- a/src/nrpe.c +++ b/src/nrpe.c @@ -61,6 +61,12 @@ int rfc931_timeout=15; # endif #endif +#ifdef HAVE_SSL +int use_ssl = TRUE; +#else +int use_ssl = FALSE; +#endif + #define DEFAULT_COMMAND_TIMEOUT 60 /* default timeout for execution of plugins */ #define MAXFD 64