Use g_open instead of ::open in PBD::FileManager
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Jul 2013 11:54:29 +0000 (07:54 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Jul 2013 11:54:29 +0000 (07:54 -0400)
g_open is a macro that evaluates to ::open on linux(and mac) so this
is only a change for windows.

libs/pbd/file_manager.cc

index e02bcc2b0d902f02c48a9289bf26c9da112130df..0c79011af14218ab9858d72c174fa5f62a0767f6 100644 (file)
@@ -24,6 +24,9 @@
 #include <cassert>
 #include <cstdio>
 
+#include <glib.h>
+#include <glib/gstdio.h>
+
 #ifdef __APPLE__
 #include <mach/mach_time.h>
 #endif
@@ -226,7 +229,7 @@ FdFileDescriptor::open ()
 {
        /* we must have a lock on the FileManager's mutex */
        
-       _fd = ::open (_path.c_str(), _writeable ? (O_RDWR | O_CREAT) : O_RDONLY, _mode);
+       _fd = ::g_open (_path.c_str(), _writeable ? (O_RDWR | O_CREAT) : O_RDONLY, _mode);
        return (_fd == -1);
 }