3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: libcdio: Fix test failure with glibc 2.36.

* gnu/packages/patches/libcdio-glibc-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/cdrom.scm (libcdio)[source](patches): New field.
This commit is contained in:
Marius Bakke 2022-11-23 20:41:36 +01:00
parent 01a2aff7bc
commit 74100ba40f
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
3 changed files with 45 additions and 0 deletions

View file

@ -1481,6 +1481,7 @@ dist_patch_DATA = \
%D%/packages/patches/lierolibre-newer-libconfig.patch \
%D%/packages/patches/lierolibre-remove-arch-warning.patch \
%D%/packages/patches/lierolibre-try-building-other-arch.patch \
%D%/packages/patches/libcdio-glibc-compat.patch \
%D%/packages/patches/linbox-fix-pkgconfig.patch \
%D%/packages/patches/linphone-desktop-without-sdk.patch \
%D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \

View file

@ -113,6 +113,7 @@ caching facility provided by the library.")
(method url-fetch)
(uri (string-append "mirror://gnu/libcdio/libcdio-"
version ".tar.bz2"))
(patches (search-patches "libcdio-glibc-compat.patch"))
(sha256
(base32
"0avi6apv5ydjy6b9c3z9a46rvp5i57qyr09vr7x4nndxkmcfjl45"))))

View file

@ -0,0 +1,43 @@
Fix test failure with glibc 2.36:
https://savannah.gnu.org/bugs/?62948
Patch taken from upstream:
https://git.savannah.gnu.org/cgit/libcdio.git/commit/?id=56335fff0f21d294cd0e478d49542a43e9495ed0
diff --git a/test/driver/realpath.c b/test/driver/realpath.c
index 289253e..cd46d62 100644
--- a/test/driver/realpath.c
+++ b/test/driver/realpath.c
@@ -1,5 +1,7 @@
/* -*- C -*-
- Copyright (C) 2010-2012, 2015, 2017 Rocky Bernstein <rocky@gnu.org>
+
+ Copyright (C) 2010-2012, 2015, 2017, 2022 Rocky Bernstein
+ <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -175,16 +177,17 @@ main(int argc, const char *argv[])
rc = check_rc(symlink(psz_symlink_file, psz_symlink_file),
"symlink", psz_symlink_file);
if (0 == rc) {
- cdio_realpath(psz_symlink_file, psz_file_check);
- if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
+ char *retvalue = cdio_realpath(psz_symlink_file, psz_file_check);
+ if (0 != retvalue) {
+ if (0 != strncmp(psz_file_check, symlink_file, PATH_MAX)) {
fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n",
psz_file_check, symlink_file);
rc = 5;
goto err_exit;
+ }
+ check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
}
- check_rc(unlink(psz_symlink_file), "unlink", psz_symlink_file);
}
-
}
check_rc(unlink(psz_orig_file), "unlink", psz_orig_file);