summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd
diff options
context:
space:
mode:
authorJonathan Bauer2019-02-13 11:10:16 +0100
committerJonathan Bauer2019-02-13 11:11:03 +0100
commitff4467f89a9861819e14458e0c8cfbbedff4eab4 (patch)
tree5028ae7c30c79a8592a2c6277c879d19da8c8c2c /core/modules/systemd
parent[rsyslogd] add missing directory (diff)
downloadmltk-ff4467f89a9861819e14458e0c8cfbbedff4eab4.tar.gz
mltk-ff4467f89a9861819e14458e0c8cfbbedff4eab4.tar.xz
mltk-ff4467f89a9861819e14458e0c8cfbbedff4eab4.zip
[systemd] patch memfd syscall
Diffstat (limited to 'core/modules/systemd')
-rw-r--r--core/modules/systemd/module.build16
1 files changed, 3 insertions, 13 deletions
diff --git a/core/modules/systemd/module.build b/core/modules/systemd/module.build
index 0e483424..2e11bcd7 100644
--- a/core/modules/systemd/module.build
+++ b/core/modules/systemd/module.build
@@ -5,19 +5,9 @@ fetch_source () {
# systemd
download_untar "$REQUIRED_URL" "src/"
- # starting with systemd 212 a new way of setting global environment is supported
- # meaning we don't have to apply the patch needed til that version.
- # patch src/core/socket.c if activated in the config file
- if [ "x$REQUIRED_XATTR_PATCH" = "xyes" ]; then
- pinfo "Patching 'src/core/socket.c' ..."
- # patch it
- if [ -e "src/systemd-$REQUIRED_VERSION/src/core/socket.c" ]; then
- sed -i 's/^#include <attr\/xattr.h>$/#include <sys\/xattr.h>\n#include <attr\/xattr.h>/g' "src/systemd-$REQUIRED_VERSION/src/core/socket.c" \
- || perror "Could not patch 'src/systemd-$REQUIRED_VERSION/src/core/socket.c'"
- else
- perror "'src/systemd-$REQUIRED_VERSION/src/core/socket.c' does not exist."
- fi
- fi
+ sed -i '2 a #undef HAVE_DECL_MEMFD_CREATE\n#define HAVE_DECL_MEMFD_CREATE 1\n#include <sys/mman.h>' \
+ "src/systemd-$REQUIRED_VERSION/src/basic/missing_syscall.h" || perror "Could not patch syscall memfd"
+
# now check if the a fix needs to be applied
if [ -e "${MODULE_DIR}/systemd-openslx-${REQUIRED_VERSION#systemd-}.patch" ]; then
patch -p0 src/systemd-*/src/basic/path-util.h < "${MODULE_DIR}/systemd-openslx-${REQUIRED_VERSION#systemd-}.patch" || perror "Failed to apply openslx systemd patch."