From 58f697f227fe89a8deb1e4917b1cfeedb7722e69 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 28 Jul 2025 18:56:58 +0200 Subject: [PATCH] Don't define main as extern "C" Was done for Android support but the cleanup didn't revert to the original version and at least clang-20 warns -Wmain Ref: f4625e69afe Ref: 20d23eb3406 Signed-off-by: Ralph Sennhauser --- source/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index 00192572ed..777f778a08 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -777,12 +777,10 @@ static void RunGameOrAtlas(const PS::span argv) #if OS_ANDROID // In Android we compile the engine as a shared library, not an executable, // so rename main() to a different symbol that the wrapper library can load -#undef main -#define main pyrogenesis_main -extern "C" __attribute__((visibility ("default"))) int main(int argc, char* argv[]); +extern "C" __attribute__((visibility ("default"))) int pyrogenesis_main(int argc, char* argv[]) +#else +int main(int argc, char* argv[]) #endif - -extern "C" int main(int argc, char* argv[]) { #if OS_UNIX // Don't allow people to run the game with root permissions,