| 1 | Fix test failure with glibc 2.36:
|
| 2 |
|
| 3 | https://savannah.gnu.org/bugs/?62948
|
| 4 |
|
| 5 | Patch taken from upstream:
|
| 6 |
|
| 7 | https://git.savannah.gnu.org/cgit/libcdio.git/commit/?id=56335fff0f21d294cd0e478d49542a43e9495ed0
|
| 8 |
|
| 9 | diff --git a/test/driver/realpath.c b/test/driver/realpath.c
|
| 10 | index 289253e..cd46d62 100644
|
| 11 | |
| 12 | |
| 13 | @@ -1,5 +1,7 @@
|
| 14 | /* -*- C -*-
|
| 15 | - Copyright (C) 2010-2012, 2015, 2017 Rocky Bernstein <[email protected]>
|
| 16 | +
|
| 17 | + Copyright (C) 2010-2012, 2015, 2017, 2022 Rocky Bernstein
|
| 18 | + <[email protected]>
|
| 19 |
|
| 20 | This program is free software: you can redistribute it and/or modify
|
| 21 | it under the terms of the GNU General Public License as published by
|
| 22 | @@ -175,16 +177,17 @@ main(int argc, const char *argv[])
|
| 23 | rc = check_rc(symlink(psz_symlink_file, psz_symlink_file),
|
| 24 | "symlink", psz_symlink_file);
|
| 25 | if (0 == rc) {
|
| 26 | - cdio_realpath(psz_symlink_file, psz_file_check);
|
| 27 | - if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
|
| 28 | + char *retvalue = cdio_realpath(psz_symlink_file, psz_file_check);
|
| 29 | + if (0 != retvalue) {
|
| 30 | + if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
|
| 31 | fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n",
|
| 32 | psz_file_check, symlink_file);
|
| 33 | rc = 5;
|
| 34 | goto err_exit;
|
| 35 | + }
|
| 36 | + check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
|
| 37 | }
|
| 38 | - check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
|
| 39 | }
|
| 40 | -
|
| 41 | }
|
| 42 |
|
| 43 | check_rc(unlink(psz_orig_file), "unlink", psz_orig_file);
|