Commit 2b2dcf34 authored by Eugene Kosov's avatar Eugene Kosov

fix buggy gcc warning on ARM

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89357

In short, alignas of big alignments doesn't work for gcc on ARM.
The bug is fixed in gcc-9.3 and won't be fixed in older branches.
F.ex gcc-7 is not supported already.
parent a4bccefb
......@@ -773,7 +773,7 @@ void log_t::file::write_header_durable(lsn_t lsn)
log_sys.log.format == log_t::FORMAT_ENC_10_5);
// man 2 open suggests this buffer to be aligned by 512 for O_DIRECT
alignas(OS_FILE_LOG_BLOCK_SIZE) byte buf[OS_FILE_LOG_BLOCK_SIZE] = {0};
MY_ALIGNED(OS_FILE_LOG_BLOCK_SIZE) byte buf[OS_FILE_LOG_BLOCK_SIZE] = {0};
mach_write_to_4(buf + LOG_HEADER_FORMAT, log_sys.log.format);
mach_write_to_4(buf + LOG_HEADER_SUBFORMAT, log_sys.log.subformat);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment