diff options
author | Marcin Gasperowicz <xnooga@gmail.com> | 2020-05-29 22:22:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-30 00:36:13 +0200 |
commit | 9a4ee9aa1a6d947c720b5a550d1d5e81e715ba98 (patch) | |
tree | 0b8f7c4e6f5c03497468e43f0b4cc5b53dae5d80 /Libraries/LibTLS | |
parent | 4e8de753c95a4741921c2f86e315b44ae07f88ff (diff) | |
download | serenity-9a4ee9aa1a6d947c720b5a550d1d5e81e715ba98.zip |
Lagom: Adjust AK, LibCore and LibTLS to build on MacOS
Diffstat (limited to 'Libraries/LibTLS')
-rw-r--r-- | Libraries/LibTLS/TLSv12.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Libraries/LibTLS/TLSv12.cpp b/Libraries/LibTLS/TLSv12.cpp index 04e88ee121..f87e73481b 100644 --- a/Libraries/LibTLS/TLSv12.cpp +++ b/Libraries/LibTLS/TLSv12.cpp @@ -30,6 +30,10 @@ #include <LibCrypto/PK/Code/EMSA_PSS.h> #include <LibTLS/TLSv12.h> +#ifndef SOCK_NONBLOCK +# include <sys/ioctl.h> +#endif + //#define TLS_DEBUG namespace { @@ -701,7 +705,13 @@ TLSv12::TLSv12(Core::Object* parent, Version version) m_context.version = version; m_context.is_server = false; m_context.tls_buffer = ByteBuffer::create_uninitialized(0); +#ifdef SOCK_NONBLOCK int fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); +#else + int fd = socket(AF_INET, SOCK_STREAM, 0); + int option = 1; + ioctl(fd, FIONBIO, &option); +#endif if (fd < 0) { set_error(errno); } else { |