aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/elogind/files/elogind-fix-musl.patch')
-rw-r--r--sys-auth/elogind/files/elogind-fix-musl.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/sys-auth/elogind/files/elogind-fix-musl.patch b/sys-auth/elogind/files/elogind-fix-musl.patch
new file mode 100644
index 0000000..4aba103
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-fix-musl.patch
@@ -0,0 +1,38 @@
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -22,6 +22,16 @@
+ #include "macro.h"
+ #include "string-util.h"
+
++#define strndupa(s, n) \
++ ({ \
++ const char *__in = (s); \
++ size_t __len = strnlen(__in, (n)); \
++ char *__out = (char *)alloca(__len + 1); \
++ __out[__len] = '\0'; \
++ (char *)memcpy(__out, __in, __len); \
++ })
++
++
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+ assert_se(hexchar(0x0) == '0');
+--- a/src/test/test-sizeof.c
++++ b/src/test/test-sizeof.c
+@@ -48,8 +48,6 @@
+ info(unsigned);
+ info(long unsigned);
+ info(long long unsigned);
+- info(__syscall_ulong_t);
+- info(__syscall_slong_t);
+
+ info(float);
+ info(double);
+@@ -59,7 +57,6 @@
+ info(ssize_t);
+ info(time_t);
+ info(usec_t);
+- info(__time_t);
+
+ info(enum Enum);
+ info(enum BigEnum);