Skip to content

Commit d8d9fa4

Browse files
authored
Merge pull request #304 from rn/compile
Fix compilation issues for Big Sur
2 parents 4791878 + eb4645d commit d8d9fa4

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ _build
55
/test/vmlinuz
66
/test/initrd
77
/test/initrd.gz
8+
/test/disk.dmg
89
/test/disk.qcow2

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ OCAML_PACKS := cstruct cstruct-lwt io-page io-page.unix uri mirage-block \
110110
mirage-unix prometheus-app conduit-lwt cohttp-lwt-unix \
111111
unix-type-representations
112112
OCAML_LDLIBS := -L $(OCAML_WHERE) \
113+
$(shell ocamlfind query bigstringaf)/bigstringaf.a \
114+
$(shell ocamlfind query bigstringaf)/libbigstringaf_stubs.a \
113115
$(shell ocamlfind query cstruct)/cstruct.a \
114116
$(shell ocamlfind query cstruct)/libcstruct_stubs.a \
115117
$(shell ocamlfind query io-page)/io_page.a \

config.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ CFLAGS_WARN := \
4545
-Wno-reserved-id-macro \
4646
-Wno-unknown-warning-option \
4747
-Wno-unused-macros \
48-
-Wno-switch-enum
48+
-Wno-switch-enum \
49+
-Wno-poison-system-directories
4950

5051
CFLAGS_DIAG := \
5152
-fmessage-length=152 \
@@ -79,4 +80,5 @@ LDFLAGS := \
7980
-arch x86_64 \
8081
-framework Hypervisor \
8182
-framework vmnet \
83+
-Wl,-no_compact_unwind \
8284
$(LDFLAGS_DBG)

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)

src/lib/vmm/intel/vmx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,12 @@ vmx_init(void)
491491
case HV_UNSUPPORTED:
492492
/* Don't know if this can happen, report to us */
493493
xhyve_abort("hv_vm_create HV_UNSUPPORTED\n");
494+
case HV_ERROR:
495+
/* An unspecified error happened */
496+
xhyve_abort("hv_vm_create HV_ERROR (unspecified error)\n");
494497
default:
495498
/* Should never happen, report to Apple */
496-
xhyve_abort("hv_vm_create unknown error %d\n", error);
499+
xhyve_abort("hv_vm_create unknown error %#010x\n", error);
497500
}
498501

499502
/*

0 commit comments

Comments
 (0)