summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-07-27 00:41:28 +0200
committerRobin Gareus <robin@gareus.org>2015-07-27 00:41:28 +0200
commit949a45b748546c125e69d794b0f73565f376ab60 (patch)
treedc7a4636893d6636e1084659c7e5ee49dc0b1820
parent009a06a7734272560d4d61350d98a2d279832ddf (diff)
fixes/updates for move to ::open()
-rw-r--r--libs/ardour/sndfileimportable.cc2
-rw-r--r--libs/ardour/sndfilesource.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/sndfileimportable.cc b/libs/ardour/sndfileimportable.cc
index 11cff41c35..7f108453b6 100644
--- a/libs/ardour/sndfileimportable.cc
+++ b/libs/ardour/sndfileimportable.cc
@@ -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 ();
}
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index e616a2679a..7dc2803a65 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -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) {