From 92ba03cd5810614dd2175279b149858d4d1b5d5a Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 13 Jun 2021 15:31:20 +0000 Subject: games-util/antimicro: fix build with GCC 11 Comparing pointer with 0. Check the size of the underlying structure instead. Closes: https://bugs.gentoo.org/791145 Signed-off-by: Sam James --- games-util/antimicro/antimicro-2.23.ebuild | 1 + .../antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch (limited to 'games-util/antimicro') diff --git a/games-util/antimicro/antimicro-2.23.ebuild b/games-util/antimicro/antimicro-2.23.ebuild index 1363ec031a9d..965970f2d3b4 100644 --- a/games-util/antimicro/antimicro-2.23.ebuild +++ b/games-util/antimicro/antimicro-2.23.ebuild @@ -32,6 +32,7 @@ PATCHES=( "${FILESDIR}"/${P}-linking-errors.patch "${FILESDIR}"/${PN}-2.23-no-compress-man-page.patch "${FILESDIR}"/${PN}-2.23-SDL2-include.patch + "${FILESDIR}"/${PN}-2.23-gcc11-ptr-compare.patch ) src_prepare() { diff --git a/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch b/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch new file mode 100644 index 000000000000..2ed157c1e84b --- /dev/null +++ b/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/791145 +--- a/src/mainwindow.cpp ++++ b/src/mainwindow.cpp +@@ -364,7 +364,7 @@ void MainWindow::makeJoystickTabs() + ui->tabWidget->addTab(tabwidget, joytabName); + } + +- if (joysticks > 0) ++ if (joysticks->size() > 0) + { + ui->tabWidget->setCurrentIndex(0); + ui->stackedWidget->setCurrentIndex(1); -- cgit v1.2.3-65-gdbad