Remove non-portable and unnused header includes
[ardour.git] / libs / pbd / sndfile_manager.cc
index 982f028dddc8adc8f017206c68c74b14b0325894..c028bc11bacae12e47c33b413c7268f14e0dbd36 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <sys/time.h>
-#include <sys/resource.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -90,12 +89,7 @@ SndFileDescriptor::open ()
 {
        /* we must have a lock on the FileManager's mutex */
        
-       int fd = ::open(_path.c_str(), O_LARGEFILE | (_writeable ? (O_RDWR|O_CREAT) : O_RDONLY));
-       if (fd == -1) return false;
-       fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
-
-       _sndfile = sf_open_fd (fd, _writeable ? SFM_RDWR : SFM_READ, _info, 1);
-
+       _sndfile = sf_open (_path.c_str(), _writeable ? SFM_RDWR : SFM_READ, _info);
        return (_sndfile == 0);
 }