1 |
commit: 92ba03cd5810614dd2175279b149858d4d1b5d5a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 13 15:31:20 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 13 17:13:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92ba03cd |
7 |
|
8 |
games-util/antimicro: fix build with GCC 11 |
9 |
|
10 |
Comparing pointer with 0. Check the size of the underlying structure |
11 |
instead. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/791145 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
games-util/antimicro/antimicro-2.23.ebuild | 1 + |
17 |
.../antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch | 12 ++++++++++++ |
18 |
2 files changed, 13 insertions(+) |
19 |
|
20 |
diff --git a/games-util/antimicro/antimicro-2.23.ebuild b/games-util/antimicro/antimicro-2.23.ebuild |
21 |
index 1363ec031a9..965970f2d3b 100644 |
22 |
--- a/games-util/antimicro/antimicro-2.23.ebuild |
23 |
+++ b/games-util/antimicro/antimicro-2.23.ebuild |
24 |
@@ -32,6 +32,7 @@ PATCHES=( |
25 |
"${FILESDIR}"/${P}-linking-errors.patch |
26 |
"${FILESDIR}"/${PN}-2.23-no-compress-man-page.patch |
27 |
"${FILESDIR}"/${PN}-2.23-SDL2-include.patch |
28 |
+ "${FILESDIR}"/${PN}-2.23-gcc11-ptr-compare.patch |
29 |
) |
30 |
|
31 |
src_prepare() { |
32 |
|
33 |
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 |
34 |
new file mode 100644 |
35 |
index 00000000000..2ed157c1e84 |
36 |
--- /dev/null |
37 |
+++ b/games-util/antimicro/files/antimicro-2.23-gcc11-ptr-compare.patch |
38 |
@@ -0,0 +1,12 @@ |
39 |
+https://bugs.gentoo.org/791145 |
40 |
+--- a/src/mainwindow.cpp |
41 |
++++ b/src/mainwindow.cpp |
42 |
+@@ -364,7 +364,7 @@ void MainWindow::makeJoystickTabs() |
43 |
+ ui->tabWidget->addTab(tabwidget, joytabName); |
44 |
+ } |
45 |
+ |
46 |
+- if (joysticks > 0) |
47 |
++ if (joysticks->size() > 0) |
48 |
+ { |
49 |
+ ui->tabWidget->setCurrentIndex(0); |
50 |
+ ui->stackedWidget->setCurrentIndex(1); |