From dd6df5a62ea3abb8d0f50ff19ab6ed45d6ea7242 Mon Sep 17 00:00:00 2001 From: Parker Liu Date: Mon, 14 Feb 2022 16:21:24 +0800 Subject: [PATCH] Fix issue of failed to compile connection.c in macOS --- src/connection/connection.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/connection/connection.c b/src/connection/connection.c index e97716ba..7b208a22 100644 --- a/src/connection/connection.c +++ b/src/connection/connection.c @@ -25,6 +25,11 @@ #include #include +#ifndef SOCK_NONBLOCK +#include +#define SOCK_NONBLOCK O_NONBLOCK +#endif + #include "connection/neu_connection.h" #include "neu_log.h" @@ -492,4 +497,4 @@ static void conn_disconnect(neu_conn_t *conn) } conn->is_connected = false; -} \ No newline at end of file +}