summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index c66b34a2ba..9f44f78705 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -33,7 +33,6 @@
#include <cerrno>
#include <iostream>
#include <sys/types.h>
-#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#ifndef COMPILER_MSVC
@@ -42,6 +41,8 @@
#include <errno.h>
#include <regex.h>
+#include <pbd/gstdio_compat.h>
+
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
@@ -662,11 +663,11 @@ ARDOUR::native_header_format_extension (HeaderFormat hf, const DataType& type)
bool
ARDOUR::matching_unsuffixed_filename_exists_in (const string& dir, const string& path)
{
- string bws = basename_nosuffix (path);
+ string bws = basename_nosuffix (path);
struct dirent* dentry;
- struct stat statbuf;
+ GStatBuf statbuf;
DIR* dead;
- bool ret = false;
+ bool ret = false;
if ((dead = ::opendir (dir.c_str())) == 0) {
error << string_compose (_("cannot open directory %1 (%2)"), dir, strerror (errno)) << endl;
@@ -684,7 +685,7 @@ ARDOUR::matching_unsuffixed_filename_exists_in (const string& dir, const string&
string fullpath = Glib::build_filename (dir, dentry->d_name);
- if (::stat (fullpath.c_str(), &statbuf)) {
+ if (g_stat (fullpath.c_str(), &statbuf)) {
continue;
}