core/log: fix non-linux typo and import unistd on freebsd

This commit is contained in:
-k 2026-03-03 11:20:56 -05:00 committed by outfoxxed
parent 0a859d51f2
commit 97b2688ad6
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -31,6 +31,9 @@
#include <sys/sendfile.h>
#include <sys/types.h>
#endif
#ifdef __FreeBSD__
#include <unistd.h>
#endif
#include "instanceinfo.hpp"
#include "logcat.hpp"
@ -67,7 +70,7 @@ bool copyFileData(int sourceFd, int destFd, qint64 size) {
return true;
#else
std::array<char, 64 * 1024> buffer = {};
auto remaining = totalTarget;
auto remaining = usize;
while (remaining > 0) {
auto chunk = std::min(remaining, buffer.size());