]> git.proxmox.com Git - mirror_qemu.git/blobdiff - bsd-user/uaccess.c
i386: Update new x86_apicid parsing rules with die_offset support
[mirror_qemu.git] / bsd-user / uaccess.c
index 9ec1b2343744e5c3c44128f2d97240c7f0750702..91e2067933dd59394014b9afdb684cb44bf2cc31 100644 (file)
@@ -1,6 +1,6 @@
 /* User memory access */
-#include <stdio.h>
-#include <string.h>
+#include "qemu/osdep.h"
+#include "qemu/cutils.h"
 
 #include "qemu.h"
 
@@ -51,7 +51,7 @@ abi_long target_strlen(abi_ulong guest_addr1)
         ptr = lock_user(VERIFY_READ, guest_addr, max_len, 1);
         if (!ptr)
             return -TARGET_EFAULT;
-        len = qemu_strnlen(ptr, max_len);
+        len = qemu_strnlen((const char *)ptr, max_len);
         unlock_user(ptr, guest_addr, 0);
         guest_addr += len;
         /* we don't allow wrapping or integer overflow */