mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-auth/elogind: fix build w/ musl-1.2.4
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31390 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -54,6 +54,7 @@ DOCS=( README.md)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-nodocs.patch"
|
||||
"${FILESDIR}/${PN}-252.9-musl-lfs.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
|
||||
51
sys-auth/elogind/files/elogind-252.9-musl-lfs.patch
Normal file
51
sys-auth/elogind/files/elogind-252.9-musl-lfs.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
https://github.com/systemd/systemd/pull/27599
|
||||
|
||||
From d096e05c625ea825eb4d781216ded717b7f71cca Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Wed, 10 May 2023 01:47:13 +0100
|
||||
Subject: [PATCH] dirent: conditionalize dirent assert based on dirent64
|
||||
existence
|
||||
|
||||
>=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native"
|
||||
functions are already LFS-aware.
|
||||
|
||||
Check for dirent64 in meson.build and only assert if it exists.
|
||||
|
||||
Bug: https://bugs.gentoo.org/905900
|
||||
Closes: https://github.com/systemd/systemd/pull/25809
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -599,6 +599,7 @@ decl_headers = '''
|
||||
# define _GNU_SOURCE 1
|
||||
# endif // _GNU_SOURCE
|
||||
#endif // 1
|
||||
+#include <dirent.h>
|
||||
#include <uchar.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -608,6 +609,7 @@ foreach decl : ['char16_t',
|
||||
'char32_t',
|
||||
'struct mount_attr',
|
||||
'struct statx',
|
||||
+ 'struct dirent64',
|
||||
]
|
||||
|
||||
# We get -1 if the size cannot be determined
|
||||
--- a/src/basic/dirent-util.h
|
||||
+++ b/src/basic/dirent-util.h
|
||||
@@ -39,6 +39,7 @@ struct dirent *readdir_no_dot(DIR *dirp);
|
||||
/* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and
|
||||
* we want them to be interchangeable to make getdents64() work, hence verify that. */
|
||||
assert_cc(_FILE_OFFSET_BITS == 64);
|
||||
+#if HAVE_STRUCT_DIRENT64
|
||||
assert_cc(sizeof(struct dirent) == sizeof(struct dirent64));
|
||||
assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino));
|
||||
assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino));
|
||||
@@ -50,6 +51,7 @@ assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type));
|
||||
assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type));
|
||||
assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name));
|
||||
assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name));
|
||||
+#endif
|
||||
|
||||
#define FOREACH_DIRENT_IN_BUFFER(de, buf, sz) \
|
||||
for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \
|
||||
Reference in New Issue
Block a user