Merge pull request #1855 from monitoring-plugins/curlfreebsdfixes

check_curl: including netinet/in.h (for FreeBSD), fixed an ambigous compare warning
This commit is contained in:
Lorenz 2023-03-27 12:32:22 +02:00 committed by GitHub
commit 482aa6c7fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,7 @@ const char *email = "devel@monitoring-plugins.org";
#include "uriparser/Uri.h"
#include <arpa/inet.h>
#include <netinet/in.h>
#if defined(HAVE_SSL) && defined(USE_OPENSSL)
#include <openssl/opensslv.h>
@ -541,7 +542,7 @@ check_http (void)
/* compose URL: use the address we want to connect to, set Host: header later */
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s",
use_ssl ? "https" : "http",
use_ssl & host_name != NULL ? host_name : server_address,
( use_ssl & ( host_name != NULL ) ) ? host_name : server_address,
server_port,
server_url
);