File openmcu-3.48.0-gcc6.patch of Package openmcu

Index: b/ptlib/src/ptlib/unix/svcproc.cxx
===================================================================
--- a/ptlib/src/ptlib/unix/svcproc.cxx
+++ b/ptlib/src/ptlib/unix/svcproc.cxx
@@ -259,6 +259,9 @@
  */
 
 #include <ptlib.h>
+#include <iostream>
+#include <cstring>
+#include <string>
 
 #pragma implementation "svcproc.h"
 #include <ptlib/svcproc.h>
@@ -378,7 +381,7 @@ void PSystemLog::Output(Level level, con
     if (systemLogFileName == "-")
       out = &cerr;
     else
-      out = new ofstream(systemLogFileName, ios::app);
+      out = new ofstream((systemLogFileName.operator std::string()).c_str(), ios::app);
 
     PTime now;
     *out << now.AsString("yyyy/MM/dd hh:mm:ss.uuu\t");
@@ -592,7 +595,7 @@ int PServiceProcess::InitialiseService()
     pid_t pid;
 
     {
-      ifstream pidfile(pidfilename);
+      ifstream pidfile((pidfilename.operator std::string()).c_str());
       if (!pidfile.is_open()) {
         cout << "Could not open pid file: \"" << pidfilename << "\""
                 " - " << strerror(errno) << endl;
@@ -722,7 +725,7 @@ int PServiceProcess::InitialiseService()
   else if (systemLogFileName == "-")
     cout << "All output for " << GetName() << " is to console." << endl;
   else {
-    ofstream logfile(systemLogFileName, ios::app);
+    ofstream logfile((systemLogFileName.operator std::string()).c_str(), ios::app);
     if (!logfile.is_open()) {
       cout << "Could not open log file \"" << systemLogFileName << "\""
               " - " << strerror(errno) << endl;
@@ -770,7 +773,7 @@ int PServiceProcess::InitialiseService()
   // Run as a daemon, ie fork
 
   if (!pidfilename) {
-    ifstream pidfile(pidfilename);
+    ifstream pidfile((pidfilename.operator std::string()).c_str());
     if (pidfile.is_open()) {
       pid_t pid;
       pidfile >> pid;
@@ -798,7 +801,7 @@ int PServiceProcess::InitialiseService()
       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((pidfilename.operator std::string()).c_str());
         if (pidfile.is_open())
           pidfile << pid;
         else
openSUSE Build Service is sponsored by