net-libs/ptlib: Fix building with GCC-6
authorPeter-Levine <plevine457@gmail.com>
Thu, 11 May 2017 05:05:59 +0000 (01:05 -0400)
committerMichał Górny <mgorny@gentoo.org>
Thu, 18 May 2017 22:25:42 +0000 (00:25 +0200)
Bug: https://bugs.gentoo.org/595690
Closes: https://github.com/gentoo/gentoo/pull/4600
Package-Manager: Portage-2.3.5, Repoman-2.3.2

net-libs/ptlib/files/ptlib-2.10.11-gcc6.patch [new file with mode: 0644]
net-libs/ptlib/ptlib-2.10.11.ebuild

diff --git a/net-libs/ptlib/files/ptlib-2.10.11-gcc6.patch b/net-libs/ptlib/files/ptlib-2.10.11-gcc6.patch
new file mode 100644 (file)
index 0000000..140de64
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/src/ptlib/unix/svcproc.cxx
++++ b/src/ptlib/unix/svcproc.cxx
+@@ -217,7 +217,7 @@
+     pid_t pid;
+ 
+     {
+-      ifstream pidfile(pidfilename);
++      ifstream pidfile(static_cast<const char*>(pidfilename));
+       if (!pidfile.is_open()) {
+         cout << "Could not open pid file: \"" << pidfilename << "\""
+                 " - " << strerror(errno) << endl;
+@@ -384,7 +384,7 @@
+   // Run as a daemon, ie fork
+ 
+   if (!pidfilename) {
+-    ifstream pidfile(pidfilename);
++    ifstream pidfile(static_cast<const char*>(pidfilename));
+     if (pidfile.is_open()) {
+       pid_t pid;
+       pidfile >> pid;
+@@ -412,7 +412,7 @@
+       cout << "Daemon started with pid " << pid << endl;
+       if (!pidfilename) {
+         // Write out the child pid to magic file in /var/run (at least for linux)
+-        ofstream pidfile(pidfilename);
++        ofstream pidfile(static_cast<const char*>(pidfilename));
+         if (pidfile.is_open())
+           pidfile << pid;
+         else
index eb76e20b14267e5df6c23d18d8073a2cb3052736..02495a8d0e38fb12bb5c8f464b83d5d0d8cd57c4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -60,7 +60,8 @@ src_prepare() {
                "${FILESDIR}/${PN}-2.10.9-pkgconfig_ldflags.patch" \
                "${FILESDIR}/${PN}-2.10.9-respect_cxxflags.patch" \
                "${FILESDIR}/${PN}-2.10.10-mga-bison-parameter.patch" \
-               "${FILESDIR}/${PN}-2.10.10-respect_cflags_cxxflags.patch"
+               "${FILESDIR}/${PN}-2.10.10-respect_cflags_cxxflags.patch" \
+               "${FILESDIR}/${P}-gcc6.patch"
 
        if ! use telnet; then
                epatch "${FILESDIR}/${PN}-2.10.9-disable-telnet-symbols.patch"