summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-07-27 13:13:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:47:00 +0100
commitd299cb3be9da6513484e3e79be4b20874baf1d38 (patch)
tree78c95c9da59d70c5e6ba165981f57ab00bb3e740 /meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
parent55681d09d7f519a1c7f17d17b18ec59bccdc91ca (diff)
downloadpoky-d299cb3be9da6513484e3e79be4b20874baf1d38.tar.gz
systemd: Fix build on musl
Latest upgrade to 249 broke a working build on musl, this is incremental fix to exisiting patches adapted to 249 release (From OE-Core rev: 06b69d0194b35010a09f0bb419d6fbabc9765a03) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch14
1 files changed, 5 insertions, 9 deletions
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index 5f2178734d..cf06572b82 100644
--- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -31,11 +31,9 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
31 src/shared/base-filesystem.c | 6 +++--- 31 src/shared/base-filesystem.c | 6 +++---
32 2 files changed, 24 insertions(+), 5 deletions(-) 32 2 files changed, 24 insertions(+), 5 deletions(-)
33 33
34diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
35index 027037f7a7..16eb379caf 100644
36--- a/src/basic/fs-util.h 34--- a/src/basic/fs-util.h
37+++ b/src/basic/fs-util.h 35+++ b/src/basic/fs-util.h
38@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); 36@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct
39 int fd_warn_permissions(const char *path, int fd); 37 int fd_warn_permissions(const char *path, int fd);
40 int stat_warn_permissions(const char *path, const struct stat *st); 38 int stat_warn_permissions(const char *path, const struct stat *st);
41 39
@@ -65,20 +63,18 @@ index 027037f7a7..16eb379caf 100644
65 63
66 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); 64 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
67 int touch(const char *path); 65 int touch(const char *path);
68diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
69index 1d05409086..1ed06c31ab 100644
70--- a/src/shared/base-filesystem.c 66--- a/src/shared/base-filesystem.c
71+++ b/src/shared/base-filesystem.c 67+++ b/src/shared/base-filesystem.c
72@@ -54,7 +54,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 68@@ -53,7 +53,7 @@ int base_filesystem_create(const char *r
73 return log_error_errno(errno, "Failed to open root file system: %m"); 69 return log_error_errno(errno, "Failed to open root file system: %m");
74 70
75 for (i = 0; i < ELEMENTSOF(table); i ++) { 71 for (size_t i = 0; i < ELEMENTSOF(table); i++) {
76- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) 72- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
77+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) 73+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
78 continue; 74 continue;
79 75
80 if (table[i].target) { 76 if (table[i].target) {
81@@ -62,7 +62,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 77@@ -61,7 +61,7 @@ int base_filesystem_create(const char *r
82 78
83 /* check if one of the targets exists */ 79 /* check if one of the targets exists */
84 NULSTR_FOREACH(s, table[i].target) { 80 NULSTR_FOREACH(s, table[i].target) {
@@ -87,7 +83,7 @@ index 1d05409086..1ed06c31ab 100644
87 continue; 83 continue;
88 84
89 /* check if a specific file exists at the target path */ 85 /* check if a specific file exists at the target path */
90@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 86@@ -72,7 +72,7 @@ int base_filesystem_create(const char *r
91 if (!p) 87 if (!p)
92 return log_oom(); 88 return log_oom();
93 89