mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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>
This commit is contained in:
parent
12bd22c70d
commit
d34ef01779
@ -39,6 +39,9 @@
|
|||||||
# include <mntent.h>
|
# include <mntent.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#if HAVE_MMAP
|
||||||
|
# include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
|
#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
|
||||||
# include <linux/loop.h>
|
# include <linux/loop.h>
|
||||||
|
@ -36,9 +36,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#if HAVE_MMAP
|
|
||||||
# include <sys/mman.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user