From d7dceb57d1d66905f5c99bc03bb5f8a4b2c6d80f Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Wed, 7 Sep 2022 12:19:29 +0200 Subject: [PATCH] lib and tests: add missing curl.h includes Closes https://github.com/curl/curl/pull/9453 --- lib/conncache.h | 1 + lib/curl_hmac.h | 2 ++ lib/curl_sha256.h | 1 + lib/dynbuf.h | 2 ++ lib/memdebug.h | 2 ++ lib/socketpair.h | 2 ++ lib/vtls/keylog.c | 1 + lib/wildcard.h | 1 + tests/server/util.h | 2 ++ 9 files changed, 14 insertions(+) diff --git a/lib/conncache.h b/lib/conncache.h index 6ec2757433..94664bc357 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -31,6 +31,7 @@ * be shared. */ +#include #include "timeval.h" struct connectdata; diff --git a/lib/curl_hmac.h b/lib/curl_hmac.h index 77dce0f165..36c0bd62e5 100644 --- a/lib/curl_hmac.h +++ b/lib/curl_hmac.h @@ -26,6 +26,8 @@ #ifndef CURL_DISABLE_CRYPTO_AUTH +#include + #define HMAC_MD5_LENGTH 16 typedef CURLcode (* HMAC_hinit_func)(void *context); diff --git a/lib/curl_sha256.h b/lib/curl_sha256.h index 82fcdff8ea..754c761fb3 100644 --- a/lib/curl_sha256.h +++ b/lib/curl_sha256.h @@ -26,6 +26,7 @@ ***************************************************************************/ #ifndef CURL_DISABLE_CRYPTO_AUTH +#include #include "curl_hmac.h" extern const struct HMAC_params Curl_HMAC_SHA256[1]; diff --git a/lib/dynbuf.h b/lib/dynbuf.h index 7deba6a5fd..26c8cd5427 100644 --- a/lib/dynbuf.h +++ b/lib/dynbuf.h @@ -24,6 +24,8 @@ * ***************************************************************************/ +#include + #ifndef BUILDING_LIBCURL /* this renames the functions so that the tool code can use the same code without getting symbol collisions */ diff --git a/lib/memdebug.h b/lib/memdebug.h index 7a99e9c58a..8f3e9ef974 100644 --- a/lib/memdebug.h +++ b/lib/memdebug.h @@ -30,6 +30,8 @@ * as well as the library. Do not mix with library internals! */ +#include + #if defined(__GNUC__) && __GNUC__ >= 3 # define ALLOC_FUNC __attribute__((malloc)) # define ALLOC_SIZE(s) __attribute__((alloc_size(s))) diff --git a/lib/socketpair.h b/lib/socketpair.h index f91a3c6511..de70df673a 100644 --- a/lib/socketpair.h +++ b/lib/socketpair.h @@ -26,6 +26,8 @@ #include "curl_setup.h" #ifndef HAVE_SOCKETPAIR +#include + int Curl_socketpair(int domain, int type, int protocol, curl_socket_t socks[2]); #else diff --git a/lib/vtls/keylog.c b/lib/vtls/keylog.c index 7471217921..1952a690ca 100644 --- a/lib/vtls/keylog.c +++ b/lib/vtls/keylog.c @@ -24,6 +24,7 @@ #include "curl_setup.h" #include "keylog.h" +#include /* The last #include files should be: */ #include "curl_memory.h" diff --git a/lib/wildcard.h b/lib/wildcard.h index f9d2167bf2..21e933b9a4 100644 --- a/lib/wildcard.h +++ b/lib/wildcard.h @@ -27,6 +27,7 @@ #include "curl_setup.h" #ifndef CURL_DISABLE_FTP +#include #include "llist.h" /* list of wildcard process states */ diff --git a/tests/server/util.h b/tests/server/util.h index 2c29fd008c..76ca37140d 100644 --- a/tests/server/util.h +++ b/tests/server/util.h @@ -83,6 +83,8 @@ void restore_signal_handlers(bool keep_sigalrm); #ifdef USE_UNIX_SOCKETS +#include /* for curl_socket_t */ + #ifdef HAVE_SYS_UN_H #include /* for sockaddr_un */ #endif /* HAVE_SYS_UN_H */