[PATCH 11/12] avoid using predefined PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The musl-libc comes with a predefined PAGE_SIZE macro, which may be
wrong on systems which support multiple smallest page sizes.
Make sure we use our own (runtime evaluated) definition of PAGE_SIZE.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
---
 include/kvm/kvm.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/kvm/kvm.h b/include/kvm/kvm.h
index 9818046..8b12cd6 100644
--- a/include/kvm/kvm.h
+++ b/include/kvm/kvm.h
@@ -19,6 +19,10 @@
 #define HOME_DIR		getenv("HOME")
 #define KVM_BINARY_NAME		"lkvm"
 
+/* Let's determine the actual page size at runtime. */
+#ifdef PAGE_SIZE
+#undef PAGE_SIZE
+#endif
 #define PAGE_SIZE (sysconf(_SC_PAGE_SIZE))
 
 #define DEFINE_KVM_EXT(ext)		\
-- 
2.3.5

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux