summaryrefslogtreecommitdiff
blob: 140de64f16e414c1b5999ec9785da3ca4c720574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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