Revert "uname: switch machine to HW_MACHINE_ARCH"

Reverting because of issue in Makefile.inc1 during native builds:
make[1]: “.../freebsd/Makefile.inc1" line 163: Unknown target aarch64:aarch64.

Since I only tested this patch with make universe on amd64, this issue wasn't caught.

This reverts commit 83bf6ab568.
This commit is contained in:
Piotr Kubaj 2022-12-12 15:39:12 +01:00
parent 896d3e43b1
commit 85dd853236

View File

@ -127,11 +127,11 @@ __xuname(int namesize, void *namebuf)
}
q += namesize;
if ((p = getenv("UNAME_p")))
if ((p = getenv("UNAME_m")))
strlcpy(q, p, namesize);
else {
mib[0] = CTL_HW;
mib[1] = HW_MACHINE_ARCH;
mib[1] = HW_MACHINE;
len = namesize;
oerrno = errno;
if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {