games-util/xboxdrv: Fix building with GCC 6
authorDavid Seifert <soap@gentoo.org>
Fri, 16 Dec 2016 10:31:25 +0000 (11:31 +0100)
committerDavid Seifert <soap@gentoo.org>
Fri, 16 Dec 2016 10:56:49 +0000 (11:56 +0100)
Gentoo-bug: 594674

Package-Manager: portage-2.3.3

games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch [new file with mode: 0644]
games-util/xboxdrv/xboxdrv-0.8.8.ebuild

diff --git a/games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch b/games-util/xboxdrv/files/xboxdrv-0.8.8-fix-c++14.patch
new file mode 100644 (file)
index 0000000..80a8d8f
--- /dev/null
@@ -0,0 +1,16 @@
+Cast boost::shared_ptr explicitly for C++14.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594674
+
+--- a/src/controller_slot.cpp
++++ b/src/controller_slot.cpp
+@@ -67,9 +67,9 @@ ControllerSlot::disconnect()
+ }
+ 
+ bool
+ ControllerSlot::is_connected() const
+ {
+-  return m_thread;
++  return static_cast<bool>(m_thread);
+ }
+ 
+ /* EOF */
index 04d3c7d0782b3c19b335b28bd1a0d4bea702ef53..804d3facbd790b64fda4be6cbd84f9d7c2e0655d 100644 (file)
@@ -29,6 +29,7 @@ S=${WORKDIR}/${MY_P}
 PATCHES=(
        "${FILESDIR}"/${P}-scons.patch
        "${FILESDIR}"/github-144.patch
+       "${FILESDIR}"/${P}-fix-c++14.patch
 )
 
 CONFIG_CHECK="~INPUT_EVDEV ~INPUT_JOYDEV ~INPUT_UINPUT ~!JOYSTICK_XPAD"