From: Denis Vlasenko Date: Thu, 27 Sep 2007 20:46:08 +0000 (-0000) Subject: libbb: align bb_common_bufsiz1 to "long long" X-Git-Tag: 1_8_0~132 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1d31f0f3800f00743ae627a38d55e8c7507bea75;p=oweals%2Fbusybox.git libbb: align bb_common_bufsiz1 to "long long" --- diff --git a/libbb/messages.c b/libbb/messages.c index 0e43ab674..a64aa405e 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -65,7 +65,10 @@ const char bb_path_wtmp_file[] ALIGN1 = #error unknown path to wtmp file #endif -char bb_common_bufsiz1[COMMON_BUFSIZE]; +/* We use it for "global" data via *(struct global*)&bb_common_bufsiz1. + * Since gcc insists on aligning struct global's members, it would be a pity + * (and an alignment fault on some CPUs) to mess it up. */ +char bb_common_bufsiz1[COMMON_BUFSIZE] __attribute__(( aligned(sizeof(long long)) )); struct globals; /* Make it reside in R/W memory: */