Several parameters common on Linux are missing on macOS. --- toys/posix/getconf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/toys/posix/getconf.c b/toys/posix/getconf.c
index 6e230efb..57c171dd 100644
--- a/toys/posix/getconf.c
+++ b/toys/posix/getconf.c
@@ -37,6 +37,20 @@ config GETCONF
#define UIO_MAXIOV 1024
#endif
+#ifdef __APPLE__
+// macOS doesn't have a bunch of stuff. The actual macOS getconf says
+// "no such parameter", but -- unless proven otherwise -- it seems more useful
+// for portability if we act like we understood but say "undefined"?
+#define _SC_AVPHYS_PAGES -1
+#define _SC_THREAD_ROBUST_PRIO_INHERIT -1
+#define _SC_THREAD_ROBUST_PRIO_PROTECT -1
+#define _SC_V7_ILP32_OFF32 -1
+#define _SC_V7_ILP32_OFFBIG -1
+#define _SC_V7_LP64_OFF64 -1
+#define _SC_V7_LPBIG_OFFBIG -1
+#define _CS_V7_ENV -1
+#endif
+
struct config {
char *name;
long long value;
--
2.19.0.605.g01d371f741-goog
0001-macOS-fix-getconf-1-build.patch
Description: Binary data
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
