[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] usage of mremap in pvrdma break FreeBSD build
From: |
Roger Pau Monné |
Subject: |
[Qemu-devel] usage of mremap in pvrdma break FreeBSD build |
Date: |
Fri, 24 Aug 2018 17:58:04 +0200 |
User-agent: |
NeoMutt/20180716 |
Hello,
The usage of mremap in the pvrdma code breaks the build on FreeBSD:
/root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:17: warning:
implicit declaration of
function 'mremap' is invalid in C99 [-Wimplicit-function-declaration]
host_virt = mremap(curr_page, 0, length, MREMAP_MAYMOVE);
^
/root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:17: warning: this
function
declaration is not a prototype [-Wstrict-prototypes]
/root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:46: error: use of
undeclared
identifier 'MREMAP_MAYMOVE'
host_virt = mremap(curr_page, 0, length, MREMAP_MAYMOVE);
^
/root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:97:48: error: use of
undeclared
identifier 'MREMAP_MAYMOVE'
mremap(curr_page, 0, TARGET_PAGE_SIZE, MREMAP_MAYMOVE | MREMAP_FIXED,
^
/root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:97:65: error: use of
undeclared
identifier 'MREMAP_FIXED'
mremap(curr_page, 0, TARGET_PAGE_SIZE, MREMAP_MAYMOVE | MREMAP_FIXED,
^
FreeBSD has librdma in base so by default QEMU configure script will
enable the build of the rdma bits in QEMU. Sadly this code uses mremap
which is Linux-specific.
AFAICT either the build of pvrdma is limited to Linux in the configure
script, or the calls to mremap are replaced with a portable
equivalent.
Thanks, Roger.
- [Qemu-devel] usage of mremap in pvrdma break FreeBSD build,
Roger Pau Monné <=