summaryrefslogtreecommitdiff
path: root/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-05-21 10:20:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-05-21 10:20:03 +0100
commit6f8038813c460b4f0572d5ef595cdfa94af3a94d (patch)
tree3509e94070265053394b7f2e30a779d7e60c2064 /dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
parenteccb70a7f91b2d22582587f26d1a28bb31408b45 (diff)
gentoo resync : 21.05.2019
Diffstat (limited to 'dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch')
-rw-r--r--dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch b/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
new file mode 100644
index 000000000000..a9ca8e9edc2b
--- /dev/null
+++ b/dev-libs/ding-libs/files/0001-path_utils_ut-allow-single-as-well.patch
@@ -0,0 +1,36 @@
+From 4236e323e8ab4f13770e1ac9e94666b304b693fb Mon Sep 17 00:00:00 2001
+From: Henrik Riomar <henrik.riomar@gmail.com>
+Date: Tue, 24 Jul 2018 21:59:36 +0000
+Subject: [PATCH 1/2] path_utils_ut: allow single / as well
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266
+ Multiple successive slashes are considered to be the same as one slash.
+
+When running the tests on a musl libc system
+ get_dirname(p, PATH_MAX, "//foo//")
+actually results in a / and not //
+
+Reviewed-by: Michal Židek <mzidek@redhat.com>
+---
+ path_utils/path_utils_ut.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/path_utils/path_utils_ut.c b/path_utils/path_utils_ut.c
+index 27c99b6..061abfb 100644
+--- a/path_utils/path_utils_ut.c
++++ b/path_utils/path_utils_ut.c
+@@ -62,7 +62,7 @@ START_TEST(test_dirname)
+ fail_unless_str_equal(p, "//foo");
+
+ fail_unless(get_dirname(p, PATH_MAX, "//foo//") == SUCCESS);
+- fail_unless_str_equal(p, "//");
++ fail_unless(!strcmp(p, "/") || !strcmp(p, "//"));
+
+ fail_unless(get_dirname(p, PATH_MAX, "foo//bar") == SUCCESS);
+ fail_unless_str_equal(p, "foo");
+--
+2.21.0
+