From 2bb83824bba50c0c37952cf9217f3676d2f0c94d Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Sun, 21 Feb 2021 00:04:07 +0100 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFssl:=20rework=20"e=5Fos.h"=20inclusion?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove e_os.h include from "ssl_local.h" - Added e_os.h into the files that need it now. - Move e_os.h to be the very first include Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14344) --- ssl/d1_lib.c | 1 + ssl/record/rec_layer_s3.c | 2 ++ ssl/s3_lib.c | 3 ++- ssl/ssl_cert.c | 2 ++ ssl/ssl_conf.c | 2 ++ ssl/ssl_lib.c | 4 +++- ssl/ssl_local.h | 1 - ssl/statem/statem.c | 2 ++ ssl/statem/statem_srvr.c | 2 ++ test/helpers/ssltestlib.c | 1 + 10 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index d055f06b39..4702c98be0 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -8,6 +8,7 @@ */ #include "internal/e_os.h" +#include "internal/e_winsock.h" /* struct timeval for DTLS_CTRL_GET_TIMEOUT */ #include #include #include diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 14db7dab2c..1f3b63ba2e 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -7,6 +7,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/e_os.h" + #include #include #include diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 86d81984a6..b98464256e 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -9,7 +9,8 @@ * https://www.openssl.org/source/license.html */ -#include +#include "internal/e_os.h" + #include #include "internal/nelem.h" #include "ssl_local.h" diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 04d08430e7..021a1a143e 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -8,6 +8,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/e_os.h" + #include #include diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 5e2d7c1c98..e6884b2b43 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -7,6 +7,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/e_os.h" + #include #include "ssl_local.h" #include diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ba9fcec55c..bca2b9faa5 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -9,8 +9,10 @@ * https://www.openssl.org/source/license.html */ -#include "ssl_local.h" #include "internal/e_os.h" +#include "internal/e_winsock.h" +#include "ssl_local.h" + #include #include #include diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h index d1c1afe94e..7b2dbe1bb0 100644 --- a/ssl/ssl_local.h +++ b/ssl/ssl_local.h @@ -12,7 +12,6 @@ #ifndef OSSL_SSL_LOCAL_H # define OSSL_SSL_LOCAL_H -# include "internal/e_os.h" /* struct timeval for DTLS */ # include # include # include diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index 921d7cfb1e..b24ffdc15d 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -7,6 +7,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/e_os.h" + #if defined(__TANDEM) && defined(_SPT_MODEL_) # include # include /* timeval */ diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index db009f3b77..d1668cb675 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -9,6 +9,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/e_os.h" + #include #include "../ssl_local.h" #include "statem_local.h" diff --git a/test/helpers/ssltestlib.c b/test/helpers/ssltestlib.c index c441199ea4..07e0756803 100644 --- a/test/helpers/ssltestlib.c +++ b/test/helpers/ssltestlib.c @@ -25,6 +25,7 @@ #if (!defined(OPENSSL_NO_KTLS) || !defined(OPENSSL_NO_QUIC)) && !defined(OPENSSL_NO_POSIX_IO) && !defined(OPENSSL_NO_SOCK) # define OSSL_USE_SOCKETS 1 +# include "internal/e_winsock.h" # include "internal/sockets.h" # include #endif