Use g_open instead of ::open in ARDOUR::touch_file for portability
authorTim Mayberry <mojofunk@gmail.com>
Sun, 26 Jul 2015 01:18:20 +0000 (11:18 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Sun, 26 Jul 2015 01:18:20 +0000 (11:18 +1000)
libs/ardour/utils.cc

index 270aaa37fd5f0c85c00b3d67200c168860fa4cce..b0088ef251444eb390b02015e8ce678b76c5c2e7 100644 (file)
@@ -42,6 +42,9 @@
 #include <errno.h>
 #include <regex.h>
 
+#include <glib.h>
+#include <glib/gstdio.h>
+
 #include <glibmm/miscutils.h>
 #include <glibmm/fileutils.h>
 
@@ -299,7 +302,7 @@ ARDOUR::cmp_nocase_utf8 (const string& s1, const string& s2)
 int
 ARDOUR::touch_file (string path)
 {
-       int fd = open (path.c_str(), O_RDWR|O_CREAT, 0660);
+       int fd = g_open (path.c_str(), O_RDWR|O_CREAT, 0660);
        if (fd >= 0) {
                close (fd);
                return 0;