[Toybox] [PATCH] Fix Mac build.

Rob Landley rob at landley.net
Wed Mar 11 07:43:09 PDT 2020


On 3/10/20 11:20 AM, enh via Toybox wrote:
> The recent re-enablement of the BLKGETSIZE64 code broke the Mac
> build. Use the equivalent <sys/disk.h> ioctl() pair instead.
> ---
>  lib/lib.c         |  5 +----
>  lib/portability.c | 20 ++++++++++++++++++++
>  lib/portability.h |  2 ++
>  3 files changed, 23 insertions(+), 4 deletions(-)

I wonder if fdlength() should just move to portability.c at this point?
(Does the mac ever need the fallback binary search? It was a workaround for a
linux bug I hit which I'm not 100% sure is still relevant, but "regression test
with all the block devices out there" is hard to do so I've left it...)

Anyway, applied,

Rob



More information about the Toybox mailing list