[Top][All Lists]

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

[Qemu-trivial] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types

From: Ed Maste
Subject: [Qemu-trivial] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types
Date: Tue, 30 Apr 2013 09:29:32 -0400

Use existence of type as #ifdef condition rather than FreeBSD-specific
version check, as suggested by Patrick Welche.

Also handle the signed (CTLTYPE_S64) case identically to the unsigned
(CTLTYPE_U64) case, per later patches in the FreeBSD ports tree

Signed-off-by: Ed Maste <address@hidden>
v2: Delete stray : at end of #ifdef conditional 

 bsd-user/syscall.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 69e3466..a4d1583 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -211,10 +211,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, 
uint32_t kind)
         *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
-#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
-    case CTLTYPE_QUAD:
+#ifdef CTLTYPE_U64
+    case CTLTYPE_S64:
     case CTLTYPE_U64:
+    case CTLTYPE_QUAD:
         *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]