diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-11-27 06:55:56 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-11-30 20:20:19 -0600 |
commit | a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832 (patch) | |
tree | fa39d984711c48daba34b1a2e12ab6a35df88f3d /user/elogind/elogind-252.9-musl-getdents.patch | |
parent | a023ea8b1755b895fb9e539262a2840aa0d65a49 (diff) | |
download | packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.gz packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.bz2 packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.xz packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.zip |
user/elogind: Update to 252.9
Ref: #1100
Diffstat (limited to 'user/elogind/elogind-252.9-musl-getdents.patch')
-rw-r--r-- | user/elogind/elogind-252.9-musl-getdents.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/user/elogind/elogind-252.9-musl-getdents.patch b/user/elogind/elogind-252.9-musl-getdents.patch new file mode 100644 index 000000000..7b81dc222 --- /dev/null +++ b/user/elogind/elogind-252.9-musl-getdents.patch @@ -0,0 +1,37 @@ +Not strictly required until musl 1.2.4, but doesn't hurt. + +From dab02796780f00d689cc1c7a0ba81abe7c5f28d0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 21 Jan 2022 15:15:11 -0800 +Subject: [PATCH] pass correct parameters to getdents64 + +Fixes +../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +../git/src/basic/stat-util.c:102:28: error: incompatible pointer types passing 'union (unnamed union at ../git/src/basic/stat-util.c:78:9) *' to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] + n = getdents64(fd, &buffer, sizeof(buffer)); + ^~~~~~~ + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> + +--- + src/basic/recurse-dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c +index d16ca98..31f6154 100644 +--- a/src/basic/recurse-dir.c ++++ b/src/basic/recurse-dir.c +@@ -54,7 +54,7 @@ int readdir_all(int dir_fd, + bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); + assert(bs > de->buffer_size); + +- n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); ++ n = getdents(dir_fd, (struct dirent*)((uint8_t*) de->buffer + de->buffer_size), bs - de->buffer_size); + if (n < 0) + return -errno; + if (n == 0) |