* [Qemu-devel] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types
@ 2013-04-30 13:29 Ed Maste
2013-05-03 13:04 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 1 reply; 2+ messages in thread
From: Ed Maste @ 2013-04-30 13:29 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Ed Maste
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
(emulators/qemu-devel/files/patch-z-arm-bsd-user-001).
Signed-off-by: Ed Maste <emaste@freebsd.org>
---
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);
break;
#endif
-#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
- case CTLTYPE_QUAD:
-#else
+#ifdef CTLTYPE_U64
+ case CTLTYPE_S64:
case CTLTYPE_U64:
+#else
+ case CTLTYPE_QUAD:
#endif
*(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
break;
--
1.7.11.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types
2013-04-30 13:29 [Qemu-devel] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types Ed Maste
@ 2013-05-03 13:04 ` Michael Tokarev
0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2013-05-03 13:04 UTC (permalink / raw)
To: Ed Maste; +Cc: qemu-trivial, qemu-devel
30.04.2013 17:29, Ed Maste wrote:
> 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
> (emulators/qemu-devel/files/patch-z-arm-bsd-user-001).
Applied to trivial-patches tree (8e4125147a8bc4da2c1e8eced722ebe31bafc19e),
thank you!
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-03 13:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-30 13:29 [Qemu-devel] [PATCH v2] bsd-user: OS-agnostic 64-bit SYSCTL types Ed Maste
2013-05-03 13:04 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).