aports/main/ssmtp/c23.patch
Arne de Bruijn f6e5a4fc1c main/ssmtp: fix build with gcc-15
Add patch from Fedora to fix the signal handler definition and cast.

Ref #17311
2025-08-05 16:08:31 +02:00

22 lines
847 B
Diff

diff -up ssmtp-2.64/ssmtp.c.c23 ssmtp-2.64/ssmtp.c
--- ssmtp-2.64/ssmtp.c.c23 2025-05-23 10:04:40.441922800 +0200
+++ ssmtp-2.64/ssmtp.c 2025-05-23 10:06:51.127476199 +0200
@@ -1494,7 +1494,7 @@ handler() -- A "normal" non-portable ver
like a socket. So we longjump instead, which is erronious on
a small number of machines and ill-defined in the language
*/
-void handler(void)
+void handler(int u)
{
extern jmp_buf TimeoutJmpBuf;
@@ -1556,7 +1556,7 @@ int ssmtp(char *argv[])
from = from_format(uad, override_from);
/* Now to the delivery of the message */
- (void)signal(SIGALRM, (void(*)())handler); /* Catch SIGALRM */
+ (void)signal(SIGALRM, handler); /* Catch SIGALRM */
(void)alarm((unsigned) MAXWAIT); /* Set initial timer */
if(setjmp(TimeoutJmpBuf) != 0) {
/* Then the timer has gone off and we bail out */