--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -838,7 +838,7 @@
 
 static bool can_passthrough_madv_dontneed(abi_ulong start, abi_ulong end)
 {
-    ulong addr;
+    abi_ulong addr;
 
     if ((start | end) & ~qemu_host_page_mask) {
         return false;
