diff mbox series

[3/3] linux-user: Fix the build on systems without MADV_{KEEP, WIPE}ONFORK

Message ID 20230810215706.1394220-4-iii@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series Fix the build on CentOS 7 | expand

Commit Message

Ilya Leoshkevich Aug. 10, 2023, 9:51 p.m. UTC
CentOS 7 does not define MADV_KEEPONFORK and MADV_WIPEONFORK. Use
definitions provided by the QEMU's copy of linux/mman.h.

Fixes: 4530deb1 ("linux-user: Add emulation for MADV_WIPEONFORK and MADV_KEEPONFORK in madvise()")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 linux-user/mmap.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 9aab48d4a30..127962c1c26 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -17,6 +17,7 @@ 
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include <linux/mman.h>
 #include "trace.h"
 #include "exec/log.h"
 #include "qemu.h"