Commit fd58082a authored by Kirill Smelkov's avatar Kirill Smelkov

X Fix build on old GCC

Similarly to pygolang@77719d8a
parent 0dfddece
......@@ -73,8 +73,14 @@ static void zfile_munmap(VMA *vma, BigFile *file) {
// NOTE reusing whole bigfile_ops for just .mmap* ops.
extern const bigfile_ops ZBigFile_mmap_ops;
const bigfile_ops ZBigFile_mmap_ops = {
.mmap_setup_read = zfile_mmap_setup_read,
.remmap_blk_read = zfile_remmap_blk_read,
.munmap = zfile_munmap,
static bigfile_ops _mkZBigFile_mmap_ops() {
// workaround for "sorry, unimplemented: non-trivial designated initializers not supported"
bigfile_ops _;
_.mmap_setup_read = zfile_mmap_setup_read;
_.remmap_blk_read = zfile_remmap_blk_read;
_.munmap = zfile_munmap;
_.loadblk = NULL;
_.storeblk = NULL;
return _;
};
const bigfile_ops ZBigFile_mmap_ops = _mkZBigFile_mmap_ops();
......@@ -58,7 +58,7 @@ struct rxPkt {
error from_string(const string& rx);
string to_string() const;
};
static_assert(sizeof(rxPkt) == 256); // NOTE 128 is too low for long error message
static_assert(sizeof(rxPkt) == 256, "rxPkt miscompiled"); // NOTE 128 is too low for long error message
// WatchLink represents /head/watch link opened on wcfs.
......
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