]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix use of mmap
authorEric Blake <eblake@redhat.com>
Sat, 11 May 2013 02:46:36 +0000 (20:46 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 11 May 2013 02:52:57 +0000 (20:52 -0600)
commitd34ef017798d50afabf2ff1cb47cc44bf0c0d9cc
tree5a620d053580cc5ff910f5cb110f8f4513094bcd
parent12bd22c70d34dda461d090620037e109d5d48b21
build: fix use of mmap

Commit bfe7721d introduced a regression, but only on platforms
like FreeBSD that lack posix_fallocate and where mmap serves as
a nice fallback for safezero.

util/virfile.c: In function 'safezero':
util/virfile.c:837: error: 'PROT_READ' undeclared (first use in this function)

* src/util/virutil.c (includes): Move use of <sys/mman.h>...
* src/util/virfile.c (includes): ...to the file that uses mmap.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/virfile.c
src/util/virutil.c