blob: 6dc619ecaaa51e9eb20c580e033e9ca6bf8acdd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 c8fa808bc4d3..2101755d4e58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,6 +335,7 @@ AC_CHECK_DECLS([
pivot_root,
name_to_handle_at,
setns,
+ syncfs,
renameat2,
kcmp,
keyctl,
diff --git a/src/basic/missing.h b/src/basic/missing.h
index 8671c56140a6..fae5329663b2 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -965,6 +965,14 @@ struct input_mask {
#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
|