diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-10-26 22:10:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-08 22:23:45 +0000 |
commit | acdee728f0f6358dda709304ec307d737124aee6 (patch) | |
tree | a275cdf37ecb69fc9fbf9cac4587fadeeb1432d4 /meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch | |
parent | 65a3b7b7b6aa91153ac3bd78411665316f1b2cba (diff) | |
download | openembedded-core-acdee728f0f6358dda709304ec307d737124aee6.tar.gz |
systemd: Fix build on musl
Add needed patches for portability across glibc/musl
enable systemd on musl too
Disable utmp,ldconfig,nss,resolved,localed for musl
which is not supported on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch b/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch new file mode 100644 index 0000000000..5234c59a78 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch @@ -0,0 +1,63 @@ +From 05dffe67919ffc72be5c017bc6cf82f164b2e8f9 Mon Sep 17 00:00:00 2001 +From: Emil Renner Berthing <systemd@esmil.dk> +Date: Mon, 23 Oct 2017 11:42:03 -0700 +Subject: [PATCH 07/12] check for missing canonicalize_file_name + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + configure.ac | 2 ++ + src/basic/missing.h | 1 + + src/basic/missing_syscall.h | 6 ++++++ + 3 files changed, 9 insertions(+) + +diff --git a/configure.ac b/configure.ac +index cd035a971..3674190fb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -333,6 +333,7 @@ AC_CHECK_DECLS([ + renameat2, + kcmp, + keyctl, ++ canonicalize_file_name, + LO_FLAGS_PARTSCAN, + copy_file_range, + explicit_bzero], +@@ -343,6 +344,7 @@ AC_CHECK_DECLS([ + #include <fcntl.h> + #include <sched.h> + #include <string.h> ++#include <stdlib.h> + #include <linux/loop.h> + ]]) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 671f341c6..8ae4964e1 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -1246,3 +1246,4 @@ struct ethtool_link_settings { + #endif + + #include "missing_syscall.h" ++ +diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h +index 898116c7b..4d44ee4fa 100644 +--- a/src/basic/missing_syscall.h ++++ b/src/basic/missing_syscall.h +@@ -28,6 +28,12 @@ static inline int pivot_root(const char *new_root, const char *put_old) { + } + #endif + ++#if !HAVE_DECL_CANONICALIZE_FILE_NAME ++static inline char *canonicalize_file_name(const char *path) { ++ return realpath(path, NULL); ++} ++#endif ++ + /* ======================================================================= */ + + #if !HAVE_DECL_MEMFD_CREATE +-- +2.14.2 + |