aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-09-28 20:11:36 -0500
committerRob Landley <rob@landley.net>2021-09-28 20:11:36 -0500
commit340b1cf8f79cc9ea7232453e0052d2418c806103 (patch)
tree07822149eb996bd6fc9e117fcaa5d9dc09883caa
parenta39df1343a42f810cde5a6f5ff446eb3ff9c8b8b (diff)
downloadtoybox-340b1cf8f79cc9ea7232453e0052d2418c806103.tar.gz
The mac compiler can't optimize out unused functions.
For some reason "configure" is explicitly NOT passing LDOPTIMIZE="-Wl,--gc-sections" to the mac build. I don't know why, but it means the linker includes unused functions in the binary, and thus complains about unused dependencies being missing.
-rw-r--r--lib/portability.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/portability.h b/lib/portability.h
index a1dd3a6d..7d8334b8 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -197,7 +197,7 @@ void *memmem(const void *haystack, size_t haystack_length,
#include <sys/personality.h>
#else
#define PER_LINUX32 0
-void personality(int x);
+#define personality(x)
#endif
#if defined(__APPLE__) || defined(__linux__)