]> git.proxmox.com Git - qemu.git/blobdiff - bsd-user/syscall.c
vnc: Make ledstate comparison before modifiers updated
[qemu.git] / bsd-user / syscall.c
index d4d039a2f6748406425016fee83ca10f5f44c9a9..a4d1583fedfd73ba330fc4e5f8927d402069647d 100644 (file)
@@ -211,7 +211,12 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind)
         *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
         break;
 #endif
+#ifdef CTLTYPE_U64
+    case CTLTYPE_S64:
+    case CTLTYPE_U64:
+#else
     case CTLTYPE_QUAD:
+#endif
         *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
         break;
     case CTLTYPE_STRING:
@@ -231,7 +236,7 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol
     void *hnamep, *holdp, *hnewp = NULL;
     size_t holdlen;
     abi_ulong oldlen = 0;
-    int32_t *snamep = qemu_malloc(sizeof(int32_t) * namelen), *p, *q, i;
+    int32_t *snamep = g_malloc(sizeof(int32_t) * namelen), *p, *q, i;
     uint32_t kind = 0;
 
     if (oldlenp)
@@ -255,7 +260,7 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol
     unlock_user(holdp, oldp, holdlen);
     if (hnewp)
         unlock_user(hnewp, newp, 0);
-    qemu_free(snamep);
+    g_free(snamep);
     return ret;
 }
 #endif