mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:18:12 +00:00
Lagom: Adjust AK, LibCore and LibTLS to build on MacOS
This commit is contained in:
parent
4e8de753c9
commit
9a4ee9aa1a
3 changed files with 19 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue