From af7169b4a70eb3f60555ced17a40780f70aaaa5c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 25 Oct 2019 12:12:22 +0200 Subject: clang/llvm 9 fix - do not eliminate a store to a fake "const" This is *much* better (9 kbytes better) than dropping "*const" optimization trick. Signed-off-by: Denys Vlasenko --- libbb/appletlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb/appletlib.c') diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 9fa17cfa1..f842e73cc 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -304,7 +304,7 @@ void lbb_prepare(const char *applet IF_FEATURE_INDIVIDUAL(, char **argv)) { #ifdef __GLIBC__ - (*(int **)&bb_errno) = __errno_location(); + (*(int **)not_const_pp(&bb_errno)) = __errno_location(); barrier(); #endif applet_name = applet; -- cgit v1.2.3