fixes/updates for move to ::open()
authorRobin Gareus <robin@gareus.org>
Sun, 26 Jul 2015 22:41:28 +0000 (00:41 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 26 Jul 2015 22:41:28 +0000 (00:41 +0200)
libs/ardour/sndfileimportable.cc
libs/ardour/sndfilesource.cc

index 11cff41c355d3898dcbee59a34d339f7187e0b3a..7f108453b673ab6b3920ac30c1d51a369f2197de 100644 (file)
@@ -74,7 +74,7 @@ SndFileImportableSource::get_timecode_info (SNDFILE* sf, SF_BROADCAST_INFO* binf
 
 SndFileImportableSource::SndFileImportableSource (const string& path)
 {
-       int fd = g_open (path.c_str (), SFM_READ, 0444);
+       int fd = g_open (path.c_str (), O_RDONLY, 0444);
        if (fd == -1) {
                throw failed_constructor ();
        }
index e616a2679a10d6fddfd2779f173943ffa575c2a6..7dc2803a65a311157d71e72c21dd42859af93cf3 100644 (file)
@@ -254,9 +254,9 @@ SndFileSource::open ()
 // global namespace qualifer. The problem is since since C99 ::g_open will
 // apparently expand to ":: open"
 #ifdef PLATFORM_WINDOWS
-       int fd = g_open (_path.c_str(), writable() ? O_RDWR : O_RDONLY, writable() ? 0644 : 0444);
+       int fd = g_open (_path.c_str(), writable() ? O_CREAT | O_RDWR : O_RDONLY, writable() ? 0644 : 0444);
 #else
-       int fd = ::open (_path.c_str(), writable() ? O_RDWR : O_RDONLY, writable() ? 0644 : 0444);
+       int fd = ::open (_path.c_str(), writable() ? O_CREAT | O_RDWR : O_RDONLY, writable() ? 0644 : 0444);
 #endif
 
        if (fd == -1) {