diff options
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index f17e0ad..6668841 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -763,9 +763,15 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args) } strlcpy(utsname.machine, class, LINUX_MAX_UTSNAME); } +#elif defined(__amd64__) /* XXX: Linux can change 'personality'. */ +#ifdef COMPAT_LINUX32 + strlcpy(utsname.machine, "i686", LINUX_MAX_UTSNAME); #else + strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME); +#endif /* COMPAT_LINUX32 */ +#else /* something other than i386 or amd64 - assume we and Linux agree */ strlcpy(utsname.machine, machine, LINUX_MAX_UTSNAME); -#endif +#endif /* __i386__ */ strlcpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME); return (copyout(&utsname, args->buf, sizeof(utsname))); |