From da527d8d2a908b824def74382761566371439003 Mon Sep 17 00:00:00 2001 From: "Jeffrey H. Johnson" Date: Thu, 26 Oct 2023 14:23:36 -0400 Subject: [PATCH] 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 --- src/unix/fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index be2c5512..891306da 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -82,7 +82,9 @@ # include #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) \