diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-01-23 16:28:10 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-01-24 13:00:25 -0500 |
commit | 7ec82a55d9c898e7483af8e52145a16b5f3d72dc (patch) | |
tree | 6549c1ca5cfcc48f7e704d896124f18ab9b9cc12 /src | |
parent | f0786a7558f882c15469c78fadf746ac4c35e17f (diff) | |
download | lighttpd-git-7ec82a55d9c898e7483af8e52145a16b5f3d72dc.tar.gz |
[core] disable sendfile() on TARGET_OS_IPHONE
x-ref:
https://redmine.lighttpd.net/boards/3/topics/10842
https://github.com/ndfred/iperf-ios/issues/17
https://github.com/dotnet/runtime/pull/69436
Diffstat (limited to 'src')
-rw-r--r-- | src/network_write.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network_write.c b/src/network_write.c index 938a7b1a..71efb3b2 100644 --- a/src/network_write.c +++ b/src/network_write.c @@ -41,6 +41,17 @@ # define NETWORK_WRITE_USE_DARWIN_SENDFILE #endif +#if defined(__APPLE__) && defined(__MACH__) +/* sendfile() on iOS/tvOS sendfile() raises SIGSYS insead of returning ENOSYS + * https://github.com/ndfred/iperf-ios/issues/17 + * https://github.com/dotnet/runtime/pull/69436 */ +#include <TargetConditionals.h> /* TARGET_OS_IPHONE, TARGET_OS_MAC */ +#if TARGET_OS_IPHONE /* iOS, tvOS, or watchOS device */ +#undef NETWORK_WRITE_USE_SENDFILE +#undef NETWORK_WRITE_USE_DARWIN_SENDFILE +#endif +#endif + #if defined HAVE_SYS_SENDFILE_H && defined HAVE_SENDFILEV && defined(__sun) # ifdef NETWORK_WRITE_USE_SENDFILE # error "can't have more than one sendfile implementation" |