mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::fs: Support anonymous non-descript mapping.
This commit is contained in:
parent
e68b93fa61
commit
af4d722ec3
1 changed files with 2 additions and 1 deletions
|
@ -2049,6 +2049,7 @@ ircd::fs::map::map(const fd &fd,
|
|||
const size_t &size)
|
||||
#if defined(HAVE_MMAP)
|
||||
{
|
||||
assert(size || int(fd) > -1);
|
||||
const auto map_size
|
||||
{
|
||||
size?: fs::size(fd)
|
||||
|
@ -2061,7 +2062,7 @@ ircd::fs::map::map(const fd &fd,
|
|||
nullptr,
|
||||
map_size,
|
||||
prot(opts),
|
||||
flags(opts),
|
||||
flags(opts) | (int(fd) == -1? MAP_ANONYMOUS : 0),
|
||||
int(fd),
|
||||
opts.offset
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue