← Commit list

1d31f0f38

Denis Vlasenko
Denis Vlasenko
2007-09-27
FAILED Duration: 16s

Subject

libbb: align bb_common_bufsiz1 to "long long"

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/messages.c+4 -1
@@ -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: */