From 48f1630967f5b2367b87d10cc6a3f8755d1f8a39 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Thu, 22 Jan 2015 10:58:21 -0500 Subject: [PATCH] OSX: define SOCK_NONBLOCK as O_NONBLOCK We already provided this mecanism for ANDROID O_NONBLOCK is declared in fcntl.h Refs #64465 Change-Id: Ib66f9f6e4b0e375a720532fe7784be73b2d59a4d --- daemon/src/media/socket_pair.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/src/media/socket_pair.cpp b/daemon/src/media/socket_pair.cpp index cd9d989e65..a762f4458c 100644 --- a/daemon/src/media/socket_pair.cpp +++ b/daemon/src/media/socket_pair.cpp @@ -44,9 +44,14 @@ #include <sys/socket.h> #include <netdb.h> -#if defined(__ANDROID__) && !defined(SOCK_NONBLOCK) +#ifdef __ANDROID__ #include <asm-generic/fcntl.h> -# define SOCK_NONBLOCK O_NONBLOCK +#define SOCK_NONBLOCK O_NONBLOCK +#endif + +#ifdef __APPLE__ +#include <fcntl.h> +#define SOCK_NONBLOCK O_NONBLOCK #endif static const int NET_POLL_TIMEOUT = 100; /* poll() timeout in ms */ -- GitLab