Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes building under MacOS Big Sur and Xcode 12 #192

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/block_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static struct blockif_sig_elem *blockif_bse_head;

#pragma clang diagnostic pop

#if !defined(__MAC_10_16)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be __MAC_OS_X_VERSION_MAX_ALLOWED < 101600


static ssize_t
preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
{
Expand All @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/pci_e82545.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down