<div dir="auto">Thoughts/explanation of how I misunderstood what you were asking here? (We build uname for macOS host builds, so I can't sync toybox if uname doesn't build.)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 27, 2021, 09:10 enh <<a href="mailto:enh@google.com">enh@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 25, 2021 at 6:23 PM Rob Landley <<a href="mailto:rob@landley.net" target="_blank" rel="noreferrer">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 9/25/21 3:02 PM, enh wrote:<br>
> macOS prints "Darwin", which i assumed was what you wanted? (the built-in macOS<br>
> uname doesn't have -o.)<br>
<br>
That's the kernel type. (Default output is -s.)<br>
<br>
Added help text describing -o as the userspace type. Made it just always say<br>
"Toybox".<br>
<br>
I ripped out the #ifdef hack from the dawn of time (back when I left busybox)<br>
and added "linux32" (a kernel level hack from 2001, introduced in 2.1.115pre3).<br>
Which means there's a new "linux32" command (didn't make that up, it's on debian<br>
already) which probably doesn't build on macos? </blockquote><div><br></div><div>you know that's what the little green check mark or little red cross next to each commit on <a href="https://github.com/landley/toybox/commits/master" target="_blank" rel="noreferrer">https://github.com/landley/toybox/commits/master</a> tells you? you can click on the red crosses to see the specific build log. in this instance: <a href="https://github.com/landley/toybox/runs/3714437120" target="_blank" rel="noreferrer">https://github.com/landley/toybox/runs/3714437120</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I stuck it in uname.c because<br>
literally all it does is tell uname to lie (man page even says so), but macos<br>
probably hasn't got the header, the function, or the macro. (Even though it's<br>
sys/personality.h rather than linux/personality.h, it SMELLS like a linux/<br>
header. Certainly not in posix.)<br>
<br>
I.E. It might need to have the #include moved, and a function prototype and<br>
macro #define in the #else case. Lemme know if that's the case. (I would have<br>
already, but... sys? Where did they get sys/ from?)<br></blockquote><div><br></div><div>does that make sense? or should we just `#ifndef __APPLE__` around the whole of linux32 in uname.c? (see attached patch in case that's not clear. tested and works on macOS locally.)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>
</blockquote></div>