summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlarig Le Lay <alarig@swordarmor.fr>2023-03-07 13:50:52 +0100
committerSam James <sam@gentoo.org>2023-03-07 13:32:19 +0000
commit7377c09d61dd996d0bed4f5c293eec02144eecf3 (patch)
tree484999492c2eadc42559102fc748524bc2b2c502 /net-misc/bird
parentnet-misc/bird: stabilize 2.0.10 for amd64 (diff)
downloadgentoo-7377c09d61dd996d0bed4f5c293eec02144eecf3.tar.gz
gentoo-7377c09d61dd996d0bed4f5c293eec02144eecf3.tar.bz2
gentoo-7377c09d61dd996d0bed4f5c293eec02144eecf3.zip
net-misc/bird: Fixing musl patch for < 2.0.12
Closes: https://bugs.gentoo.org/900104 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/bird')
-rw-r--r--net-misc/bird/files/bird-2.0.12-musl-tests.patch43
-rw-r--r--net-misc/bird/files/bird-2.0.9-musl-tests.patch39
2 files changed, 56 insertions, 26 deletions
diff --git a/net-misc/bird/files/bird-2.0.12-musl-tests.patch b/net-misc/bird/files/bird-2.0.12-musl-tests.patch
new file mode 100644
index 000000000000..df6e00e04dfe
--- /dev/null
+++ b/net-misc/bird/files/bird-2.0.12-musl-tests.patch
@@ -0,0 +1,43 @@
+https://bird.network.cz/pipermail/bird-users/2023-March/016743.html
+https://gitlab.nic.cz/labs/bird/-/commit/0f679438f36d8c2a31dfe490007e983b085caef6
+
+From 0f679438f36d8c2a31dfe490007e983b085caef6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Mon, 6 Mar 2023 11:19:30 +0100
+Subject: [PATCH] Printf test suite fails on systems with musl libc because
+ tests for "%m" and "%M" formats expect "Input/output error" message but musl
+ returns "I/O error". Proposed change compares the printf output with string
+ returned from strerror function for EIO constant.
+
+See-also: https://bugs.gentoo.org/836713
+
+Minor change from committer.
+---
+ lib/printf_test.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/printf_test.c b/lib/printf_test.c
+index 47ea905d..88ecf05e 100644
+--- a/lib/printf_test.c
++++ b/lib/printf_test.c
+@@ -32,11 +32,14 @@ t_simple(void)
+ BSPRINTF(1, "@", buf, "@", 64);
+ BSPRINTF(1, "\xff", buf, "%c", 0xff);
+
+- errno = 5;
+- BSPRINTF(18, "Input/output error", buf, "%m");
++ const char *io_error_str = lp_strdup(tmp_linpool, strerror(EIO));
++ const int io_error_len = strlen(io_error_str);
++
++ errno = EIO;
++ BSPRINTF(io_error_len, io_error_str, buf, "%m");
+ errno = 0;
+
+- BSPRINTF(18, "Input/output error", buf, "%M", 5);
++ BSPRINTF(io_error_len, io_error_str, buf, "%M", EIO);
+
+ BSPRINTF(11, "TeSt%StRiNg", buf, "%s", "TeSt%StRiNg");
+
+--
+GitLab
+
diff --git a/net-misc/bird/files/bird-2.0.9-musl-tests.patch b/net-misc/bird/files/bird-2.0.9-musl-tests.patch
index df6e00e04dfe..4da5788fa4d4 100644
--- a/net-misc/bird/files/bird-2.0.9-musl-tests.patch
+++ b/net-misc/bird/files/bird-2.0.9-musl-tests.patch
@@ -1,43 +1,30 @@
https://bird.network.cz/pipermail/bird-users/2023-March/016743.html
-https://gitlab.nic.cz/labs/bird/-/commit/0f679438f36d8c2a31dfe490007e983b085caef6
-
-From 0f679438f36d8c2a31dfe490007e983b085caef6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
-Date: Mon, 6 Mar 2023 11:19:30 +0100
-Subject: [PATCH] Printf test suite fails on systems with musl libc because
- tests for "%m" and "%M" formats expect "Input/output error" message but musl
- returns "I/O error". Proposed change compares the printf output with string
- returned from strerror function for EIO constant.
-
See-also: https://bugs.gentoo.org/836713
-
-Minor change from committer.
+Signed-off-by: Petr Vaněk <arkamar at atlas.cz>
---
- lib/printf_test.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
+ lib/printf_test.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/printf_test.c b/lib/printf_test.c
-index 47ea905d..88ecf05e 100644
+index 47ea905d..ca278975 100644
--- a/lib/printf_test.c
+++ b/lib/printf_test.c
@@ -32,11 +32,14 @@ t_simple(void)
BSPRINTF(1, "@", buf, "@", 64);
BSPRINTF(1, "\xff", buf, "%c", 0xff);
-
-- errno = 5;
-- BSPRINTF(18, "Input/output error", buf, "%m");
-+ const char *io_error_str = lp_strdup(tmp_linpool, strerror(EIO));
+
++ const char * io_error_str = strerror(EIO);
+ const int io_error_len = strlen(io_error_str);
+
-+ errno = EIO;
+ errno = 5;
+- BSPRINTF(18, "Input/output error", buf, "%m");
+ BSPRINTF(io_error_len, io_error_str, buf, "%m");
errno = 0;
-
+
- BSPRINTF(18, "Input/output error", buf, "%M", 5);
-+ BSPRINTF(io_error_len, io_error_str, buf, "%M", EIO);
-
++ BSPRINTF(io_error_len, io_error_str, buf, "%M", 5);
+
BSPRINTF(11, "TeSt%StRiNg", buf, "%s", "TeSt%StRiNg");
-
---
-GitLab
+--
+2.39.2