mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd::fs: Add autoconfs for sync(2) etc.
This commit is contained in:
parent
dcbeb3fd4a
commit
10201c11eb
2 changed files with 6 additions and 2 deletions
|
@ -1382,6 +1382,8 @@ AC_CHECK_FUNCS([ \
|
|||
pwritev2 \
|
||||
strlcat \
|
||||
strlcpy \
|
||||
sync \
|
||||
syncfs \
|
||||
])
|
||||
|
||||
AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo]))
|
||||
|
|
|
@ -700,10 +700,12 @@ ircd::fs::sync(const fd &fd,
|
|||
"fs::sync(fd:%d)", int(fd)
|
||||
};
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(HAVE_SYNCFS)
|
||||
syscall(::syncfs, fd);
|
||||
#else
|
||||
#elif defined(HAVE_SYNC)
|
||||
syscall(::sync);
|
||||
#else
|
||||
#error "Missing sync(2) on this platform."
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue