Make Linux uname(2) return x86_64 to 32-bit apps. This helps Steam.
PR: kern/240432 Analyzed by by: Alex S <iwtcex@gmail.com> Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25248
This commit is contained in:
parent
ef6fdb3312
commit
3d8dd98381
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362205
@ -704,7 +704,17 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args)
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if defined(__amd64__)
|
||||||
|
/*
|
||||||
|
* On amd64, Linux uname(2) needs to return "x86_64"
|
||||||
|
* for both 64-bit and 32-bit applications. On 32-bit,
|
||||||
|
* the string returned by getauxval(AT_PLATFORM) needs
|
||||||
|
* to remain "i686", though.
|
||||||
|
*/
|
||||||
|
strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME);
|
||||||
|
#else
|
||||||
strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME);
|
strlcpy(utsname.machine, linux_kplatform, LINUX_MAX_UTSNAME);
|
||||||
|
#endif
|
||||||
|
|
||||||
return (copyout(&utsname, args->buf, sizeof(utsname)));
|
return (copyout(&utsname, args->buf, sizeof(utsname)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user