systemd: fix build with older kernels
PATCH 1/1 systemd: fix build with older kernels
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92
Signed-off-by Fabrice Fontaine <[email protected]>
--- ...pability-fix-build-without-PR_CAP_AMBIENT.patch | 61 ++++++++++++++++++++++ ...mpfile-util.c-fix-build-without-O_TMPFILE.patch | 34 ++++++++++++ ...0006-missing_if_link.h-add-IFLA_BOND_MODE.patch | 49 +++++++++++++++++ .../0007-missing_syscall.h-include-errno.h.patch | 28 ++++++++++ ...file-util.c-fix-build-without-F_OFD_SETLK.patch | 34 ++++++++++++ 5 files changed, 206 insertions(+) create mode 100644 package/systemd/0004-capability-fix-build-without-PR_CAP_AMBIENT.patch create mode 100644 package/systemd/0005-basic-tmpfile-util.c-fix-build-without-O_TMPFILE.patch create mode 100644 package/systemd/0006-missing_if_link.h-add-IFLA_BOND_MODE.patch create mode 100644 package/systemd/0007-missing_syscall.h-include-errno.h.patch create mode 100644 package/systemd/0008-lockfile-util.c-fix-build-without-F_OFD_SETLK.patch
package/systemd/0004-capability-fix-build-without-PR_CAP_AMBIENT.patch new file +61 -0
@@ -0,0 +1,61 @@ +From 822809d0afd0f984750a61b2391059411afa4333 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 11 Jan 2019 16:07:00 +0100 +Subject: [PATCH] capability: fix build without PR_CAP_AMBIENT + +systemd fails to build on kernel without PR_CAP_AMBIENT (< 4.3) since +https://github.com/systemd/systemd/commit/2a03bb3e65327c73008f1db485ffc75c432dc6b2 + +To fix this error, include missing_prctl.h in all files using +PR_CAP_AMBIENT + +Fixes: + - http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92 + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/systemd/systemd/pull/11400] +--- + src/basic/capability-util.c | 1 + + src/test/test-capability.c | 1 + + src/test/test-execute.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c +index a3f3ca9f5..b944ee6ea 100644 +--- a/src/basic/capability-util.c ++++ b/src/basic/capability-util.c +@@ -13,6 +13,7 @@ + #include "fileio.h" + #include "log.h" + #include "macro.h" ++#include "missing_prctl.h" + #include "parse-util.h" + #include "user-util.h" + #include "util.h" +diff --git a/src/test/test-capability.c b/src/test/test-capability.c +index dae85f2f9..3db05878a 100644 +--- a/src/test/test-capability.c ++++ b/src/test/test-capability.c +@@ -13,6 +13,7 @@ + #include "fd-util.h" + #include "fileio.h" + #include "macro.h" ++#include "missing_prctl.h" + #include "parse-util.h" + #include "tests.h" + #include "util.h" +diff --git a/src/test/test-execute.c b/src/test/test-execute.c +index 2115061ad..cea68b8cf 100644 +--- a/src/test/test-execute.c ++++ b/src/test/test-execute.c +@@ -13,6 +13,7 @@ + #include "fs-util.h" + #include "macro.h" + #include "manager.h" ++#include "missing_prctl.h" + #include "mkdir.h" + #include "path-util.h" + #include "rm-rf.h" +-- +2.14.1 +
package/systemd/0005-basic-tmpfile-util.c-fix-build-without-O_TMPFILE.patch new file +34 -0
@@ -0,0 +1,34 @@ +From b1ca50178b97b3b827b0420ec7bdf9cb1d6fec56 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 11 Jan 2019 16:36:06 +0100 +Subject: [PATCH] basic/tmpfile-util.c: fix build without O_TMPFILE + +systemd fails to build on kernel without O_TMPFILE (< 3.11) since +https://github.com/systemd/systemd/commit/dea72eda9cdbfeedd24cbe8c734ad0639bf96cde + +To fix this error, include missing_fcntl.h + +Fixes: + - http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92 + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/systemd/systemd/pull/11400] +--- + src/basic/tmpfile-util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/tmpfile-util.c b/src/basic/tmpfile-util.c +index 669eb2666..bc92d6a6d 100644 +--- a/src/basic/tmpfile-util.c ++++ b/src/basic/tmpfile-util.c +@@ -8,6 +8,7 @@ + #include "hexdecoct.h" + #include "macro.h" + #include "memfd-util.h" ++#include "missing_fcntl.h" + #include "missing_syscall.h" + #include "path-util.h" + #include "process-util.h" +-- +2.14.1 +
package/systemd/0006-missing_if_link.h-add-IFLA_BOND_MODE.patch new file +49 -0
49 lines not on this page · raw message
package/systemd/0007-missing_syscall.h-include-errno.h.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 985d15d636b4d2c7086dbd305369c02756cdbe19 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 11 Jan 2019 17:24:21 +0100 +Subject: [PATCH] missing_syscall.h: include errno.h + +This include is needed for errno and ENOSYS + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/systemd/systemd/pull/11400] +--- + src/basic/missing_syscall.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h +index d5d4b26ac..d1aa32218 100644 +--- a/src/basic/missing_syscall.h ++++ b/src/basic/missing_syscall.h +@@ -3,6 +3,7 @@ + + /* Missing glibc definitions to access certain kernel APIs */ + ++#include <errno.h> + #include <fcntl.h> + #include <sys/syscall.h> + #include <sys/types.h> +-- +2.14.1 +
package/systemd/0008-lockfile-util.c-fix-build-without-F_OFD_SETLK.patch new file +34 -0
@@ -0,0 +1,34 @@ +From badb5dafa9efc89384d9d2bea5648f7b017204d7 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 11 Jan 2019 17:30:32 +0100 +Subject: [PATCH] lockfile-util.c: fix build without F_OFD_SETLK + +systemd fails to build on kernel without F_OFD_SETLK since +https://github.com/systemd/systemd/commit/9714c020fc4cda1823c2a77e3fd08aefa7d78b25 + +So put include missing_fcntl.h + +Fixes: + - http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92 + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/systemd/systemd/pull/11400] +--- + src/shared/lockfile-util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/shared/lockfile-util.c b/src/shared/lockfile-util.c +index 4bae23b24..260c2088d 100644 +--- a/src/shared/lockfile-util.c ++++ b/src/shared/lockfile-util.c +@@ -12,6 +12,7 @@ + #include "fs-util.h" + #include "lockfile-util.h" + #include "macro.h" ++#include "missing_fcntl.h" + #include "path-util.h" + + int make_lock_file(const char *p, int operation, LockFile *ret) { +-- +2.14.1 +
Signature · 1 line
2.14.1
Thomas Petazzoni
AppliedPATCH 1/1 systemd: fix build with older kernels
Hello,
Quoted 4 lines · Fabrice Fontaine
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92Signed-off-by Fabrice Fontaine <[email protected]>
Quoted 12 lines
--- ...pability-fix-build-without-PR_CAP_AMBIENT.patch | 61 ++++++++++++++++++++++ ...mpfile-util.c-fix-build-without-O_TMPFILE.patch | 34 ++++++++++++ ...0006-missing_if_link.h-add-IFLA_BOND_MODE.patch | 49 +++++++++++++++++ .../0007-missing_syscall.h-include-errno.h.patch | 28 ++++++++++ ...file-util.c-fix-build-without-F_OFD_SETLK.patch | 34 ++++++++++++ 5 files changed, 206 insertions(+) create mode 100644 package/systemd/0004-capability-fix-build-without-PR_CAP_AMBIENT.patch create mode 100644 package/systemd/0005-basic-tmpfile-util.c-fix-build-without-O_TMPFILE.patch create mode 100644 package/systemd/0006-missing_if_link.h-add-IFLA_BOND_MODE.patch create mode 100644 package/systemd/0007-missing_syscall.h-include-errno.h.patch create mode 100644 package/systemd/0008-lockfile-util.c-fix-build-without-F_OFD_SETLK.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 systemd: fix build with older kernels
In reply to Fabrice FontaineQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fixes:
- http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2018.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard