diff --git a/src/block_if.c b/src/block_if.c index 25d6e79..529d8be 100644 --- a/src/block_if.c +++ b/src/block_if.c @@ -121,6 +121,8 @@ static struct blockif_sig_elem *blockif_bse_head; #pragma clang diagnostic pop +#if !defined(__MAC_10_16) + static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) { @@ -141,6 +143,8 @@ pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset) return writev(fd, iov, iovcnt); } +#endif + static int blockif_enqueue(struct blockif_ctxt *bc, struct blockif_req *breq, enum blockop op) diff --git a/src/pci_e82545.c b/src/pci_e82545.c index aac672c..269a05e 100644 --- a/src/pci_e82545.c +++ b/src/pci_e82545.c @@ -1412,8 +1412,11 @@ e82545_transmit(struct e82545_softc *sc, uint16_t head, uint16_t tail, /* Allocate, fill and prepend writable header vector. */ if (hdrlen != 0) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Walloca" hdr = __builtin_alloca((size_t)(hdrlen + vlen)); - hdr += vlen; +#pragma clang diagnostic push + hdr += vlen; for (left = hdrlen, hdrp = hdr; left > 0; left -= now, hdrp += now) { now = MIN(left, (int)(iov->iov_len));