summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-08-01 22:04:14 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2015-08-02 10:59:45 +0200
commit5172210e3862b76f048dae61d02711665c135d0e (patch)
tree1822098aa12001e3e41d29398ce6ae82d8affd61 /patches
parent83193b9fae2c557bc3a45382fb0671e386e487fd (diff)
downloadptxdist-5172210e3862b76f048dae61d02711665c135d0e.tar.gz
ptxdist-5172210e3862b76f048dae61d02711665c135d0e.tar.xz
host-systemd: add yet another patch for older systems
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/systemd-223/0002-missing-add-BPF_XOR.patch2
-rw-r--r--patches/systemd-223/0007-missing-define-syncfs.patch45
-rw-r--r--patches/systemd-223/series3
3 files changed, 49 insertions, 1 deletions
diff --git a/patches/systemd-223/0002-missing-add-BPF_XOR.patch b/patches/systemd-223/0002-missing-add-BPF_XOR.patch
index a64cd2823..8e4d90318 100644
--- a/patches/systemd-223/0002-missing-add-BPF_XOR.patch
+++ b/patches/systemd-223/0002-missing-add-BPF_XOR.patch
@@ -4,6 +4,8 @@ Subject: [PATCH] missing: add BPF_XOR
BPF_XOR was introduced in kernel 3.7
+Not for upstream, but needed for host-systemd.
+
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
src/basic/missing.h | 4 ++++
diff --git a/patches/systemd-223/0007-missing-define-syncfs.patch b/patches/systemd-223/0007-missing-define-syncfs.patch
new file mode 100644
index 000000000..84a1c5cc7
--- /dev/null
+++ b/patches/systemd-223/0007-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 | 2 ++
+ src/basic/missing.h | 7 +++++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 353afaec7ee6..f84d86ccc8d0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -290,6 +290,8 @@ AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not
+ CAP_LIBS="$LIBS"
+ AC_SUBST(CAP_LIBS)
+
++AC_CHECK_DECLS([syncfs], [], [], [[#include <unistd.h>]])
++
+ AC_CHECK_FUNCS([memfd_create])
+ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 98d0d49dade0..631334366f6d 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -880,6 +880,13 @@ static inline int setns(int fd, int nstype) {
+ #ifndef AT_EMPTY_PATH
+ #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
diff --git a/patches/systemd-223/series b/patches/systemd-223/series
index 3c7ada804..0e5c02b35 100644
--- a/patches/systemd-223/series
+++ b/patches/systemd-223/series
@@ -6,4 +6,5 @@
0004-missing-define-__NR_kcmp-if-necessary.patch
0005-missing-define-O_PATH-and-AT_EMPTY_PATH.patch
0006-HACK-configure.ac-don-t-use-AM_PATH_LIBGCRYPT.patch
-# defe636145de2bd40ef12fd72c1c0786 - git-ptx-patches magic
+0007-missing-define-syncfs.patch
+# 9bd5de3ee85a5be568fc8a27b0adaa70 - git-ptx-patches magic