Skip to content

Commit fd0675c

Browse files
committed
block_if: rename preadv/pwritev
macOS Big Sur seems to have introduced their own version of these functions. Use an _ to pick up our version of these functions. This is based on b7e589f91e68 ("Support Big Sur (#200)") from https://github.com/machyve/xhyve Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
1 parent 66d6c08 commit fd0675c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/block_if.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static struct blockif_sig_elem *blockif_bse_head;
138138

139139

140140
static ssize_t
141-
preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
141+
_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
142142
{
143143
off_t res;
144144

@@ -149,7 +149,7 @@ preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
149149

150150

151151
static ssize_t
152-
pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
152+
_pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
153153
{
154154
off_t res;
155155

@@ -181,7 +181,7 @@ block_preadv(struct blockif_ctxt *bc, const struct iovec *iov, int iovcnt,
181181
HYPERKIT_BLOCK_PREADV(offset, iovec_len(iov, iovcnt));
182182

183183
if (bc->bc_fd >= 0)
184-
ret = preadv(bc->bc_fd, iov, iovcnt, offset);
184+
ret = _preadv(bc->bc_fd, iov, iovcnt, offset);
185185

186186
#ifdef HAVE_OCAML_QCOW
187187
else if (bc->bc_mbh >= 0)
@@ -205,7 +205,7 @@ block_pwritev(struct blockif_ctxt *bc, const struct iovec *iov, int iovcnt,
205205
HYPERKIT_BLOCK_PWRITEV(offset, iovec_len(iov, iovcnt));
206206

207207
if (bc->bc_fd >= 0)
208-
ret = pwritev(bc->bc_fd, iov, iovcnt, offset);
208+
ret = _pwritev(bc->bc_fd, iov, iovcnt, offset);
209209

210210
#ifdef HAVE_OCAML_QCOW
211211
else if (bc->bc_mbh >= 0)

0 commit comments

Comments
 (0)