From f65b06d8562428f62ac7776f6005ad02c38d8f8d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Dec 12 2022 18:42:30 +0000 Subject: Port configure script to C99 Related to: --- diff --git a/monit-configure-c99.patch b/monit-configure-c99.patch new file mode 100644 index 0000000..a841bbe --- /dev/null +++ b/monit-configure-c99.patch @@ -0,0 +1,83 @@ +Port the configure script to C99. Add the missing int return type, +and avoid calling the undeclared exit function. + +More or less submitted upstream: + + + +diff --git a/configure b/configure +index 5c4f1e64c5aae6e9..333844a0f0b8af7a 100755 +--- a/configure ++++ b/configure +@@ -19167,12 +19167,12 @@ else + #include + /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 + * are defined, and that we can actually create an IPv6 TCP socket.*/ +- main() ++ int main() + { + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); +- exit(fd >= 0 ? 0 : 1); ++ return fd >= 0 ? 0 : 1; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +diff --git a/configure.ac b/configure.ac +index cd79d897e8af9e85..7dabb3701a222daa 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -448,12 +448,12 @@ AC_ARG_WITH(ipv6, + #include + /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 + * are defined, and that we can actually create an IPv6 TCP socket.*/ +- main() ++ int main() + { + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); +- exit(fd >= 0 ? 0 : 1); ++ return fd >= 0 ? 0 : 1; + }]])], + [ac_cv_ipv6=yes], + [ac_cv_ipv6=no], +diff --git a/libmonit/configure b/libmonit/configure +index af9afddf28d1caab..38e0332973a59863 100755 +--- a/libmonit/configure ++++ b/libmonit/configure +@@ -18425,12 +18425,12 @@ else + #include + /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 + * are defined, and that we can actually create an IPv6 TCP socket.*/ +- main() ++ int main() + { + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); +- exit(fd >= 0 ? 0 : 1); ++ return fd >= 0 ? 0 : 1; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +diff --git a/libmonit/configure.ac b/libmonit/configure.ac +index 74d246ae6a2def1b..ddc705a25643c98c 100644 +--- a/libmonit/configure.ac ++++ b/libmonit/configure.ac +@@ -349,12 +349,12 @@ AC_ARG_WITH(ipv6, + #include + /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 + * are defined, and that we can actually create an IPv6 TCP socket.*/ +- main() ++ int main() + { + int fd; + struct sockaddr_in6 foo; + fd = socket(AF_INET6, SOCK_STREAM, 0); +- exit(fd >= 0 ? 0 : 1); ++ return fd >= 0 ? 0 : 1; + }]])], + [ac_cv_ipv6=yes], + [ac_cv_ipv6=no], diff --git a/monit.spec b/monit.spec index 5cbe77b..64a33f3 100644 --- a/monit.spec +++ b/monit.spec @@ -1,11 +1,12 @@ Name: monit Version: 5.32.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Manages and monitors processes, files, directories and devices License: AGPLv3 URL: https://mmonit.com/monit/ Source0: https://mmonit.com/monit/dist/%{name}-%{version}.tar.gz +Patch0: monit-configure-c99.patch BuildRequires: make BuildRequires: gcc @@ -30,7 +31,11 @@ and can execute meaningful causal actions in error situations. %prep -%setup -q +%autosetup -p1 + +# Prevent-rerunning autoconf. +touch -r aclocal.m4 configure* +touch -r libmonit/aclocal.m4 libmonit/configure* %build %configure --disable-static @@ -79,6 +84,9 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/monit.d %{_mandir}/man1/monit.1* %changelog +* Mon Dec 12 2022 Florian Weimer - 5.32.0-3 +- Port configure script to C99 + * Thu Jul 21 2022 Fedora Release Engineering - 5.32.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild