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) { ...@@ -73,8 +73,14 @@ static void zfile_munmap(VMA *vma, BigFile *file) {
// NOTE reusing whole bigfile_ops for just .mmap* ops. // NOTE reusing whole bigfile_ops for just .mmap* ops.
extern const bigfile_ops ZBigFile_mmap_ops; extern const bigfile_ops ZBigFile_mmap_ops;
const bigfile_ops ZBigFile_mmap_ops = { static bigfile_ops _mkZBigFile_mmap_ops() {
.mmap_setup_read = zfile_mmap_setup_read, // workaround for "sorry, unimplemented: non-trivial designated initializers not supported"
.remmap_blk_read = zfile_remmap_blk_read, bigfile_ops _;
.munmap = zfile_munmap, _.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 { ...@@ -58,7 +58,7 @@ struct rxPkt {
error from_string(const string& rx); error from_string(const string& rx);
string to_string() const; 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. // 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