From 188d52251f05dcfd0600d127d76dae3c36fc0678 Mon Sep 17 00:00:00 2001 From: Fabian Albert Date: Thu, 15 Aug 2024 10:07:56 +0200 Subject: [PATCH] fix tls_ssl_key_log_file example --- src/examples/tls_ssl_key_log_file.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/examples/tls_ssl_key_log_file.cpp b/src/examples/tls_ssl_key_log_file.cpp index b47e8bd4312..be1440fc04a 100644 --- a/src/examples/tls_ssl_key_log_file.cpp +++ b/src/examples/tls_ssl_key_log_file.cpp @@ -23,6 +23,9 @@ #include #include #endif +#if defined(BOTAN_TARGET_OS_HAS_POSIX1) + #include +#endif namespace { @@ -201,7 +204,9 @@ class DtlsConnection : public Botan::TLS::Callbacks { if(fd) { #if defined(BOTAN_TARGET_OS_HAS_SOCKETS) shutdown(fd, SHUT_RDWR); + #if defined(BOTAN_TARGET_OS_HAS_POSIX1) ::close(fd); + #endif #endif } }