1
0
forked from mirrors/0ad

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: f4625e69af
Ref: 20d23eb340
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-07-28 18:56:58 +02:00
parent f8a2d5ddaa
commit 58f697f227
+3 -5
View File
@@ -777,12 +777,10 @@ static void RunGameOrAtlas(const PS::span<const char* const> 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,