C99 compatibility fix in the testsuite

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-01-10 11:13:44 +01:00
parent e5a7e0081e
commit 07f4318bf8
2 changed files with 26 additions and 1 deletions

20
libtool-c99.patch Normal file
View File

@ -0,0 +1,20 @@
Include <string.h> for the strcmp function. This improves C99
compiler compatibility because it avoids an implicit function
declaration.
Submitted upstream:
<https://lists.gnu.org/archive/html/libtool-patches/2023-01/msg00000.html>
diff --git a/tests/lt_dlopen_a.at b/tests/lt_dlopen_a.at
index 95f18a0df165d41d..d3948738e4199cc6 100644
--- a/tests/lt_dlopen_a.at
+++ b/tests/lt_dlopen_a.at
@@ -27,6 +27,7 @@ AT_KEYWORDS([libltdl lt_dlopen_a])
AT_DATA([main.c],
[[#include <ltdl.h>
#include <stdio.h>
+#include <string.h>
/* This dlopen() in the main executable should override any dlopen()s in
shared libraries etc.

View File

@ -8,7 +8,7 @@
Summary: The GNU Portable Library Tool
Name: libtool
Version: 2.4.7
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+ and LGPLv2+ and GFDL
URL: http://www.gnu.org/software/libtool/
@ -47,6 +47,8 @@ Patch5: 0001-tests-Fix-grep-warning-about-stray-before.patch
Patch100: libtool-nodocs.patch
%endif
Patch101: libtool-c99.patch
# /usr/bin/libtool includes paths within gcc's versioned directories
# Libtool must be rebuilt whenever a new upstream gcc is built
# Starting with gcc 7 gcc in Fedora is packaged so that only major
@ -169,6 +171,9 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%changelog
* Tue Jan 10 2023 Florian Weimer <fweimer@redhat.com> - 2.4.7-4
- C99 compatibility fix in the testsuite
* Wed Dec 21 2022 Frederic Berat <fberat@redhat.com> - 2.4.7-3
- Fix test failure due to grep update