OSDN Git Service

fix build on FreeBSD
authorIvailo Monev <xakepa10@gmail.com>
Mon, 26 Oct 2020 03:00:21 +0000 (05:00 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Mon, 26 Oct 2020 03:00:21 +0000 (05:00 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/io/qfilesystemengine_unix.cpp

index 017a614..75985b3 100644 (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);