diff options
Diffstat (limited to 'patches/systemd-230/0006-missing-define-syncfs.patch')
-rw-r--r-- | patches/systemd-230/0006-missing-define-syncfs.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/systemd-230/0006-missing-define-syncfs.patch b/patches/systemd-230/0006-missing-define-syncfs.patch new file mode 100644 index 000000000..b117a1e2e --- /dev/null +++ b/patches/systemd-230/0006-missing-define-syncfs.patch @@ -0,0 +1,45 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +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 <m.olbrich@pengutronix.de> +--- + 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 |