public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/autossh] epel10: Port configure script to C99.
@ 2026-10-11 14:41 Peter Fordham
  0 siblings, 0 replies; only message in thread
From: Peter Fordham @ 2026-10-11 14:41 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/autossh
            Branch : epel10
            Commit : d5fcfc2e58cca32e90be2745f57ce8107296de8b
            Author : Peter Fordham <peter.fordham@gmail.com>
            Date   : 2022-12-08T10:40:55+01:00
            Stats  : +40/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/autossh/c/d5fcfc2e58cca32e90be2745f57ce8107296de8b?branch=epel10

            Log:
            Port configure script to C99.

https://fedoraproject.org/wiki/Toolchain/PortingToModernC
Rebuilding configure with new autotools would also solve the problem.

---
diff --git a/autossh-configure-c99.patch b/autossh-configure-c99.patch
new file mode 100644
index 0000000..102163d
--- /dev/null
+++ b/autossh-configure-c99.patch
@@ -0,0 +1,34 @@
+diff --git a/configure b/configure
+index 0452e96..0a23391 100755
+--- a/configure
++++ b/configure
+@@ -2692,8 +2692,8 @@ main ()
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+ 	|| toupper (i) != TOUPPER (i))
+-      exit(2);
+-  exit (0);
++      return 2;
++  return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+@@ -4460,6 +4460,7 @@ else
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* By Ruediger Kuhlmann. */
++      #include "confdefs.h"
+       #include <sys/types.h>
+       #if HAVE_UNISTD_H
+       # include <unistd.h>
+@@ -4468,8 +4469,8 @@ else
+       int main ()
+       {
+ 	if (fork() < 0)
+-	  exit (1);
+-	exit (0);
++	  return 1;
++	retutn 0;
+       }
+ _ACEOF
+ rm -f conftest$ac_exeext

diff --git a/autossh.spec b/autossh.spec
index 80d8942..f4ba986 100644
--- a/autossh.spec
+++ b/autossh.spec
@@ -1,12 +1,13 @@
 Summary: Utility to autorestart SSH tunnels
 Name: autossh
 Version: 1.4g
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: BSD
 URL: https://www.harding.motd.ca/autossh/
 Source0: https://www.harding.motd.ca/autossh/autossh-1.4g.tgz
 Source1: autossh@.service
 Source2: README.service
+Patch0: autossh-configure-c99.patch
 BuildRequires:  gcc
 BuildRequires: /usr/bin/ssh
 BuildRequires: systemd
@@ -21,6 +22,7 @@ dies or stops passing traffic, autossh will automatically restart it.
 
 %prep
 %setup -q
+%patch0 -p1
 cp -p %{SOURCE2} .
 
 %build
@@ -79,6 +81,9 @@ fi
 %{_unitdir}/*
 
 %changelog
+* Wed Dec 07 2022 Peter Fordham <peter.fordham@gmail.com> - 1.4g-10
+- Port configure script to C99.
+
 * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4g-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-11 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 14:41 [rpms/autossh] epel10: Port configure script to C99 Peter Fordham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox