diff --git a/source/shared_lib/sources/feathery_ftp/ftpTargetPosix.c b/source/shared_lib/sources/feathery_ftp/ftpTargetPosix.c index fba3057a0..1fd0340bf 100644 --- a/source/shared_lib/sources/feathery_ftp/ftpTargetPosix.c +++ b/source/shared_lib/sources/feathery_ftp/ftpTargetPosix.c @@ -25,6 +25,12 @@ #include #include #include + +#if defined(__APPLE__) +#include +#include +#endif + #include #if defined(__FreeBSD__) @@ -203,7 +209,7 @@ int ftpSend(socket_t s, const void *data, int len) do { -#ifdef __APPLE__ +#if defined(__APPLE__) && defined(SO_NOSIGPIPE) currLen = send(s, data, len, SO_NOSIGPIPE); #else currLen = send(s, data, len, MSG_NOSIGNAL);