void-packages/srcpkgs/gettext/patches/musl-realpath.patch

42 lines
1.6 KiB
Diff

https://gitlab.alpinelinux.org/alpine/aports/-/issues/12295
This patch is necessary only with musl after 1.2.2
----
test-canonicalize.c:339: assertion 'strcmp (result1, "/") == 0' failed
Aborted (core dumped)
FAIL test-canonicalize (exit status: 134)
----
diff --git a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
index ff82981..17842e8 100644
--- a/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
+++ b/gettext-tools/gnulib-tests/test-canonicalize-lgpl.c
@@ -208,8 +208,8 @@ main (void)
#ifndef __MVS__
if (SAME_INODE (st1, st2))
{
- ASSERT (strcmp (result1, "/") == 0);
- ASSERT (strcmp (result2, "/") == 0);
+ ASSERT (strcmp (result1, "/") == 0 || strcmp (result1, "//") == 0);
+ ASSERT (strcmp (result2, "/") == 0 || strcmp (result2, "//") == 0);
}
else
#endif
--- a/gettext-tools/gnulib-tests/test-canonicalize.c
+++ b/gettext-tools/gnulib-tests/test-canonicalize.c
@@ -336,10 +336,10 @@
ASSERT (stat ("//", &st2) == 0);
if (SAME_INODE (st1, st2))
{
- ASSERT (strcmp (result1, "/") == 0);
- ASSERT (strcmp (result2, "/") == 0);
- ASSERT (strcmp (result3, "/") == 0);
- ASSERT (strcmp (result4, "/") == 0);
+ ASSERT (strcmp (result1, "/") == 0 || strcmp (result1, "//") == 0);
+ ASSERT (strcmp (result2, "/") == 0 || strcmp (result2, "//") == 0);
+ ASSERT (strcmp (result3, "/") == 0 || strcmp (result3, "//") == 0);
+ ASSERT (strcmp (result4, "/") == 0 || strcmp (result4, "//") == 0);
}
else
{