Don't use sendfile() in libcxx

This commit is contained in:
Justine Tunney 2024-07-28 15:02:38 -07:00
parent 18964e5d76
commit 0d7c272d3f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -37,7 +37,10 @@
#include <fcntl.h> /* values for fchmodat */
#include <time.h>
#if __has_include(<sys/sendfile.h>)
#if defined(__COSMOPOLITAN__)
# include <fstream>
# define _LIBCPP_FILESYSTEM_USE_FSTREAM
#elif __has_include(<sys/sendfile.h>)
# include <sys/sendfile.h>
# define _LIBCPP_FILESYSTEM_USE_SENDFILE
#elif defined(__APPLE__) || __has_include(<copyfile.h>)