unix: no preadv/pwritev workaround if not needed (#4180)

The workaround for preadv/pwritev is needed only
for Solaris, not illumos, so avoid it on illumos.

Haiku R1/prebeta5 (and later) provide preadv and
pwritev, so only use workaround on lower versions.

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
This commit is contained in:
Jeffrey H. Johnson 2023-10-26 14:23:36 -04:00 committed by GitHub
parent b8368a1441
commit da527d8d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,9 @@
# include <sys/statfs.h>
#endif
#if defined(__CYGWIN__) || defined(__HAIKU__) || defined(__sun)
#if defined(__CYGWIN__) || \
(defined(__HAIKU__) && B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5) || \
(defined(__sun) && !defined(__illumos__))
#define preadv(fd, bufs, nbufs, off) \
pread(fd, (bufs)->iov_base, (bufs)->iov_len, off)
#define pwritev(fd, bufs, nbufs, off) \