]> git.ipfire.org Git - thirdparty/coreutils.git/commit
uname: port to recent macOS
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 6 Dec 2021 22:39:22 +0000 (14:39 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Dec 2021 22:00:42 +0000 (14:00 -0800)
commite3d1ff04370b3e090e4cfeb8f6cc4a63590a516f
tree4c955ff80feee4a230ac748264a7acb969152f08
parent5e36c0ce078a65c7dac6ac5ebdfb0cf096856427
uname: port to recent macOS

Problem reported by Jakub Sokołowski (bug #52330).
* src/uname.c [__APPLE__]: Don’t include sys/syctl.h,
mach/machine.h, mach-o/arch.h.
(print_element_env): New function.  With __APPLE__, it defers to the
env var UNAME_MACHINE (if given) for uname -m, and similarly for -nrsv.
(main): Use it.  For -p with __APPLE__, rely on predefined macros
and omit any 64-bit indication, for compatibility with macOS uname.
src/uname.c