Move the sys/personality.h import Mac can't do into portability.h.
(Need to test this on FreeBSD too...)
diff --git a/lib/portability.h b/lib/portability.h
index 63d8251..d7f163a 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -193,6 +193,13 @@
#endif
#endif
+#ifdef __linux__
+#include <sys/personality.h>
+#else
+#define LINUX_PER32 0
+void personality(int x);
+#endif
+
#if defined(__APPLE__) || defined(__linux__)
// Linux and macOS has both have getxattr and friends in <sys/xattr.h>, but
// they aren't compatible.
diff --git a/toys/posix/uname.c b/toys/posix/uname.c
index 905e231..fe44ced 100644
--- a/toys/posix/uname.c
+++ b/toys/posix/uname.c
@@ -69,7 +69,6 @@
uname_main();
}
-#include <sys/personality.h>
void linux32_main(void)
{
personality(PER_LINUX32);