fix build on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-10-26 05:00:21 +02:00
parent b7f762a2e4
commit 6251e7309c

View file

@ -374,7 +374,7 @@ bool QFileSystemEngine::copyFile(const QFileSystemEntry &source, const QFileSyst
#undef QT_SENDFILE
#elif defined(Q_OS_FREEBSD)
QT_OFF_T totalwrite = 0;
int sendresult = ::sendfile(sourcefd, targetfd, QT_OFF_T(0), size_t(0), Q_NULLPTR, totalwrite, SF_SYNC);
int sendresult = ::sendfile(sourcefd, targetfd, QT_OFF_T(0), size_t(0), Q_NULLPTR, &totalwrite, SF_SYNC);
if (QT_OFF_T(sendresult) != totalwrite) {
*error = errno;
::close(sourcefd);