Florian Weimer 2023-04-15 22:01:55 +02:00
commit 3ce3ab2bc5
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,18 @@
Avoid an implicit int, which was removed from the C99 revision of the
C language. This prevents altering the outcome of the check with
future compilers.
Submitted upstream: <https://github.com/Macaulay2/M2/pull/2814>
diff -ur M2-release-1.21.orig/M2/configure.ac M2-release-1.21/M2/configure.ac
--- M2-release-1.21.orig/M2/configure.ac 2023-04-15 19:52:33.823153026 +0200
+++ M2-release-1.21/M2/configure.ac 2023-04-15 20:00:57.701024623 +0200
@@ -1719,7 +1719,7 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
- main() {
+ int main(void) {
struct addrinfo *addr;
return 0 != getaddrinfo("1.2.3.4", "80", 0, &addr) ? 99 : 0 ;
}

View file

@ -52,7 +52,7 @@
Summary: System for algebraic geometry and commutative algebra
Name: Macaulay2
Version: 1.21
Release: 4%{?dist}
Release: 5%{?dist}
# GPL-2.0-only OR GPL-3.0-only:
# - the project as a whole
@ -264,6 +264,7 @@ Patch5: %{name}-1.17-configure.patch
Patch6: %{name}-1.16-rightarrow.patch
# Fix LTO warnings about mismatched declarations and definitions
Patch7: %{name}-1.18-lto.patch
Patch8: Macaulay2-configure-c99.patch
BuildRequires: 4ti2
BuildRequires: appstream
@ -445,6 +446,7 @@ ln -s %{_datadir}/factory \
%patch5 -p1 -b .configure
%patch6 -p1 -b .rightarrow
%patch7 -p1 -b .lto
%patch8 -p2 -b .configure-c99
# repeatable builds: inject a node name
sed -i 's,`uname -n`,build.fedoraproject.org,' configure.ac
@ -613,6 +615,9 @@ make check -C BUILD/%{_target_platform}/Macaulay2/bin
%changelog
* Sat Apr 15 2023 Florian Weimer <fweimer@redhat.com> - 1.21-5
- Port configure script to C99
* Mon Feb 20 2023 Jonathan Wakely <jwakely@redhat.com> - 1.21-4
- Rebuilt for Boost 1.81