Major/minor device encoding is not portable. No two BSDs agree with
each other, and Darwin is different again.

Everyone does agree on having major()/minor()/makedev() macros, but
they disagree whether they should be in <sys/types.h> (the BSDs
including Darwin, and old versions of glibc) or <sys/sysmacros.h>
(glibc >= 2.26 and bionic).

This fixes `ls -l /dev/zero` and `stat /dev/zero` on Mac.

---
 lib/lib.c         | 15 ---------------
 lib/lib.h         |  3 ---
 lib/portability.c | 33 +++++++++++++++++++++++++++++++++
 lib/portability.h |  5 +++++
 4 files changed, 38 insertions(+), 18 deletions(-)

Attachment: 0001-Fix-dev_minor-dev_major-dev_makedev-for-Mac.patch
Description: Binary data

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to