From 7af571d485b7baa659919b7e1716e06fc24052a5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 27 Sep 2021 20:38:41 -0500 Subject: [PATCH] Move the sys/personality.h import Mac can't do into portability.h. (Need to test this on FreeBSD too...) --- lib/portability.h | 7 +++++++ toys/posix/uname.c | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/portability.h b/lib/portability.h index 63d8251c..d7f163a3 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -193,6 +193,13 @@ void *memmem(const void *haystack, size_t haystack_length, #endif #endif +#ifdef __linux__ +#include +#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 , but // they aren't compatible. diff --git a/toys/posix/uname.c b/toys/posix/uname.c index 905e2311..fe44cedd 100644 --- a/toys/posix/uname.c +++ b/toys/posix/uname.c @@ -69,7 +69,6 @@ void arch_main(void) uname_main(); } -#include void linux32_main(void) { personality(PER_LINUX32); -- 2.39.2