8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00

Fixed platforms that do not have O_NOATIME option

This commit is contained in:
alexpeshkoff 2009-03-12 12:04:41 +00:00
parent 8d6d7f9528
commit 816fa4d309

View File

@ -365,7 +365,10 @@ void NBackup::open_database_scan()
NULL); NULL);
if (dbase == INVALID_HANDLE_VALUE) if (dbase == INVALID_HANDLE_VALUE)
b_error::raise(uSvc, "Error (%d) opening database file: %s", GetLastError(), dbname.c_str()); b_error::raise(uSvc, "Error (%d) opening database file: %s", GetLastError(), dbname.c_str());
#else #else // WIN_NT
#ifndef O_NOATIME
#define O_NOATIME 0
#endif // O_NOATIME
dbase = open(dbname.c_str(), O_RDONLY | O_LARGEFILE | O_NOATIME | O_DIRECT); dbase = open(dbname.c_str(), O_RDONLY | O_LARGEFILE | O_NOATIME | O_DIRECT);
if (dbase < 0) if (dbase < 0)
b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str()); b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str());