Skip to content

Commit 5af6950

Browse files
committed
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) ```
1 parent 6ba78ac commit 5af6950

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/check_nrpe.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ extern char *log_file;
7777

7878
#ifdef HAVE_SSL
7979
SSL *ssl;
80+
int use_ssl = TRUE;
8081
unsigned long ssl_opts = SSL_OP_ALL;
82+
#else
83+
int use_ssl = FALSE;
8184
#endif
8285
int have_log_opts = FALSE;
8386
SslParms sslprm = {

src/nrpe.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ int rfc931_timeout=15;
6161
# endif
6262
#endif
6363

64+
#ifdef HAVE_SSL
65+
int use_ssl = TRUE;
66+
#else
67+
int use_ssl = FALSE;
68+
#endif
69+
6470

6571
#define DEFAULT_COMMAND_TIMEOUT 60 /* default timeout for execution of plugins */
6672
#define MAXFD 64

0 commit comments

Comments
 (0)