summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-13 15:31:20 +0000
committerSam James <sam@gentoo.org>2021-06-13 17:13:49 +0000
commit92ba03cd5810614dd2175279b149858d4d1b5d5a (patch)
tree8ce36435fc1fdf2e10f3be4f516f00d7638c7f0e /games-util/antimicro
parentdev-util/goland: bump to 2021.1.3 (diff)
downloadgentoo-92ba03cd5810614dd2175279b149858d4d1b5d5a.tar.gz
gentoo-92ba03cd5810614dd2175279b149858d4d1b5d5a.tar.bz2
gentoo-92ba03cd5810614dd2175279b149858d4d1b5d5a.zip
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 <sam@gentoo.org>
Diffstat (limited to 'games-util/antimicro')
-rw-r--r--games-util/antimicro/antimicro-2.23.ebuild1
-rw-r--r--games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch12
2 files changed, 13 insertions, 0 deletions
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);