From 933aae1c06e8511a135e9751247d0d71c9bdeae8 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 10 Oct 2022 04:20:04 +0300
Subject: [PATCH] reverted commit 7394f23f3d for SDL_main compatibility..
---
chatd.c | 6 +++++-
showinterfaces.c | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/chatd.c b/chatd.c
index f2aa0f1..4dff269 100644
--- a/chatd.c
+++ b/chatd.c
@@ -190,11 +190,14 @@ static void cleanup(int exitcode)
exit(exitcode);
}
-int main(void)
+int main(int argc, char *argv[])
{
IPaddress serverIP;
int i;
+ (void) argc;
+ (void) argv;
+
/* Initialize SDL */
if ( SDL_Init(0) < 0 ) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
@@ -261,3 +264,4 @@ int main(void)
/* Not reached, but fixes compiler warnings */
return 0;
}
+
diff --git a/showinterfaces.c b/showinterfaces.c
index 5485d74..bcac85b 100644
--- a/showinterfaces.c
+++ b/showinterfaces.c
@@ -22,11 +22,14 @@
#define MAX_ADDRESSES 10
-int main(void)
+int main(int argc, char *argv[])
{
IPaddress addresses[MAX_ADDRESSES];
int i, count;
+ (void) argc;
+ (void) argv;
+
count = SDLNet_GetLocalAddresses(addresses, MAX_ADDRESSES);
SDL_Log("Found %d local addresses", count);
for (i = 0; i < count; ++i) {