Skip to content
Snippets Groups Projects
Commit 2443f1df authored by Mathieu Mirmont's avatar Mathieu Mirmont
Browse files

patches: fix build with gcc-14 (Closes: #1075523)

parent a861b694
No related branches found
No related tags found
No related merge requests found
From: Mathieu Mirmont <mat@parad0x.org>
Date: Sat, 17 Aug 2024 01:15:50 +0200
Subject: src/try*.c: fix main() prototypes
Fix the prototype of the main() functions of some compile-test tools
since GCC-14 warns about them and fails the build with -Werror.
Forwarded: not-needed
---
src/tryflock.c | 2 +-
src/trymkffo.c | 2 +-
src/trysgact.c | 2 +-
src/trysgprm.c | 2 +-
src/trywaitp.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/tryflock.c b/src/tryflock.c
index a82ffc2..68599d3 100644
--- a/src/tryflock.c
+++ b/src/tryflock.c
@@ -4,7 +4,7 @@
#include <sys/file.h>
#include <fcntl.h>
-main()
+int main()
{
flock(0,LOCK_EX | LOCK_UN | LOCK_NB);
}
diff --git a/src/trymkffo.c b/src/trymkffo.c
index 9356342..4f8b286 100644
--- a/src/trymkffo.c
+++ b/src/trymkffo.c
@@ -3,7 +3,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-void main()
+int main()
{
mkfifo("temp-trymkffo",0);
}
diff --git a/src/trysgact.c b/src/trysgact.c
index e264ef2..841b88a 100644
--- a/src/trysgact.c
+++ b/src/trysgact.c
@@ -2,7 +2,7 @@
#include <signal.h>
-main()
+int main()
{
struct sigaction sa;
sa.sa_handler = 0;
diff --git a/src/trysgprm.c b/src/trysgprm.c
index a46c82c..3e78a82 100644
--- a/src/trysgprm.c
+++ b/src/trysgprm.c
@@ -2,7 +2,7 @@
#include <signal.h>
-main()
+int main()
{
sigset_t ss;
diff --git a/src/trywaitp.c b/src/trywaitp.c
index 319b81f..76b3329 100644
--- a/src/trywaitp.c
+++ b/src/trywaitp.c
@@ -3,7 +3,7 @@
#include <sys/types.h>
#include <sys/wait.h>
-main()
+int main()
{
waitpid(0,0,0);
}
0001-socklog-conf-update-service.patch
0002-tryto-c.patch
0003-patches-fix-build-warnings.patch
0004-src-try-.c-fix-main-prototypes.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment