*/
#include <sys/time.h>
-#include <sys/resource.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
{
/* 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);
}