Date: Thu, 14 May 2026 09:30:19 +0000 From: Max Brazhnikov <makc@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 736716fcf0f8 - main - games/colobot: Backport upstream patch to fix build with modern compilers Message-ID: <6a05962b.39e0e.324b431c@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=736716fcf0f886becc8892adfd6596bc7d405ce9 commit 736716fcf0f886becc8892adfd6596bc7d405ce9 Author: Max Brazhnikov <makc@FreeBSD.org> AuthorDate: 2026-05-14 09:29:47 +0000 Commit: Max Brazhnikov <makc@FreeBSD.org> CommitDate: 2026-05-14 09:29:47 +0000 games/colobot: Backport upstream patch to fix build with modern compilers --- games/colobot/files/patch-src_app_main.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/games/colobot/files/patch-src_app_main.cpp b/games/colobot/files/patch-src_app_main.cpp new file mode 100644 index 000000000000..3885b67a4c52 --- /dev/null +++ b/games/colobot/files/patch-src_app_main.cpp @@ -0,0 +1,25 @@ +--- src/app/main.cpp ++++ 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" ++#endifhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a05962b.39e0e.324b431c>
