0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-01 19:22:53 +01:00

ircd::fs: Don't set -1 offset on systems without RWF_APPEND.

This commit is contained in:
Jason Volk 2019-03-15 18:34:35 -07:00
parent 293f6d5480
commit 353fc35df4

View file

@ -793,12 +793,14 @@ ircd::fs::append(const fd &fd,
const write_opts &opts_)
{
auto opts(opts_);
if(!aio::support_append)
{
#if defined(RWF_APPEND)
if(aio::support_append)
opts.offset = -1;
#endif
if(!opts.offset)
opts.offset = syscall(::lseek, fd, 0, SEEK_END);
}
else opts.offset = -1;
return write(fd, bufs, opts);
}