Backport of commit 1561854b03500d39955c66971c9c98de1937d7e6

gcc15 complains that specifying linkage for main is not allowed.
> error: cannot declare ‘::main’ with a linkage
>        specification [-Wpedantic]

This commit wraps the extern block in #ifdefs that check
if the main -> SDL_main macro is in use.

Index: src/app/main.cpp
--- src/app/main.cpp.orig
+++ src/app/main.cpp
@@ -94,10 +94,14 @@ The current layout is the following:
  - src/script - link with the CBot library
 */
 
-//! Entry point to the program
+// On *some* platforms, SDL declares a macro which renames main to SDL_main.
+// If that's the case, use "extern C" to prevent name mangling.
+#ifdef main
 extern "C"
 {
+#endif
 
+//! Entry point to the program
 int main(int argc, char *argv[])
 {
     CLogger logger; // single instance of logger
@@ -176,4 +180,6 @@ int main(int argc, char *argv[])
     return code;
 }
 
+#ifdef main
 } // extern "C"
+#endif
