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(-)

--- 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);
 }
--- 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);
 }
--- 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;
--- a/src/trysgprm.c
+++ b/src/trysgprm.c
@@ -2,7 +2,7 @@
 
 #include <signal.h>
 
-main()
+int main()
 {
   sigset_t ss;
  
--- 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);
 }
--- a/src/trypoll.c
+++ b/src/trypoll.c
@@ -1,5 +1,6 @@
 /* Public domain. */
 
+#include <unistd.h>
 #include <sys/types.h>
 #include <fcntl.h>
 #include <poll.h>
--- a/src/tryulong64.c
+++ b/src/tryulong64.c
@@ -1,5 +1,7 @@
 /* Public domain. */
 
+#include <unistd.h>
+
 int main()
 {
   unsigned long u;
