Skip to content

Commit

Permalink
Ensure use_ssl is set when using --disable-ssl.
Browse files Browse the repository at this point in the history
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)
```
  • Loading branch information
sebastic committed Dec 11, 2024
1 parent 6ba78ac commit 5af6950
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/check_nrpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 6 additions & 0 deletions src/nrpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5af6950

Please sign in to comment.