From: Michael Olbrich Date: Sat, 1 Aug 2015 21:36:38 +0200 Subject: [PATCH] missing: define syncfs This is required for glibc < 2.14 Upstream requires glibc 2.16 but this is useful for host-systemd. Signed-off-by: Michael Olbrich --- configure.ac | 1 + src/basic/missing.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 35f96228f06a..00a68a7ea867 100644 --- a/configure.ac +++ b/configure.ac @@ -309,6 +309,7 @@ AC_CHECK_DECLS([ pivot_root, name_to_handle_at, setns, + syncfs, getrandom, renameat2, kcmp, diff --git a/src/basic/missing.h b/src/basic/missing.h index 187b16757887..e67763c9b8ca 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -849,6 +849,14 @@ struct btrfs_ioctl_quota_ctl_args { #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ #endif +#if !HAVE_DECL_SYNCFS +static inline int syncfs(int fd) +{ + errno = ENOSYS; + return -1; +} +#endif + #ifndef IPV6_UNICAST_IF #define IPV6_UNICAST_IF 76 #endif