Track change in FreeBSD SYSCTL(9) types
PATCH 1/1 Track change in FreeBSD SYSCTL(9) types
Originally from Garrett Cooper in FreeBSD PR ports/155558
http://www.freebsd.org/cgi/query-pr.cgi?pr=155558
--- bsd-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+)
bsd-user/syscall.c +4 -0
@@ -211,7 +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 +case CTLTYPE_U64 : +#endif *(uint64_t *)holdp =tswap64 (*(uint64_t *)holdp);break ;case CTLTYPE_STRING :
Signature · 1 line
1.7.11.5
On Thu, Apr 25, 2013 at 01:59:41PM -0400, Ed Maste wrote:
CCing [email protected].
Quoted 28 lines
Originally from Garrett Cooper in FreeBSD PR ports/155558
http://www.freebsd.org/cgi/query-pr.cgi?pr=155558Signed-off-by Ed Maste <[email protected]>--- bsd-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+)bsd-user/syscall.c +4
-0@@ -211,7 +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 +case CTLTYPE_U64 : +#endif *(uint64_t *)holdp =tswap64 (*(uint64_t *)holdp);break ;case CTLTYPE_STRING :Signature · 1 line
1.7.11.5
Stefan Hajnoczi
AppliedQuoted 7 lines · Ed Maste
Originally from Garrett Cooper in FreeBSD PR ports/155558
http://www.freebsd.org/cgi/query-pr.cgi?pr=155558Signed-off-by Ed Maste <[email protected]>--- bsd-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
Quoted 14 lines · Ed Maste
Originally from Garrett Cooper in FreeBSD PR ports/155558
http://www.freebsd.org/cgi/query-pr.cgi?pr=155558Signed-off-by Ed Maste <[email protected]>--- bsd-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+)bsd-user/syscall.c +0
-0@@ -211,7 +211,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind) *(uint64_t *)holdp =tswap64 (*(unsigned long *)holdp);
bsd-user/syscall.c static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind) · line 221
Quoted 10 lines
bsd-user/syscall.c +4
-0break ;#endif +#if !defined(__FreeBSD_version) || __FreeBSD_version <900031 case CTLTYPE_QUAD : +#else +case CTLTYPE_U64 : +#endif *(uint64_t *)holdp =tswap64 (*(uint64_t *)holdp);break ;case CTLTYPE_STRING :
Would something OS agnostic such as
#ifdef CTLTYPE_U64
case CTLTYPE_U64:
#else
case CTLTYPE_QUAD:
#endif
have done?
Cheers,
Patrick