Change fallocate() to posix_fallocate()
[platform/core/security/ode.git] / server / file-sink.cpp
index 091b69b..e1fc324 100644 (file)
@@ -74,7 +74,7 @@ void FileLogSink::resize()
        if (blkcnt <= MAX_LOG_LEN)
                return;
 
-       ret = ::fallocate(fd, FALLOC_FL_COLLAPSE_RANGE, 0, blksize*(blkcnt-MAX_LOG_LEN));
+       ret = ::posix_fallocate(fd, 0, blksize*(blkcnt-MAX_LOG_LEN));
        if (ret < 0)
                std::cerr << "Failed to collapse the log file : " << errno << std::endl;
 }