1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-07-02 09:00:27 +08:00

Apple线程安全

This commit is contained in:
fumiama
2021-05-03 12:27:38 +08:00
parent ab3d955687
commit 2eae8ec479

View File

@@ -16,8 +16,6 @@
#if !__APPLE__ #if !__APPLE__
#include <sys/sendfile.h> #include <sys/sendfile.h>
#else
struct sf_hdtr hdtr;
#endif #endif
#define PASSWORD "fumiama" #define PASSWORD "fumiama"
@@ -129,6 +127,7 @@ int sendAll(char* file_path, THREADTIMER *timer) {
printf("Get file size: %u bytes.\n", file_size); printf("Get file size: %u bytes.\n", file_size);
off_t len = 0; off_t len = 0;
#if __APPLE__ #if __APPLE__
struct sf_hdtr hdtr;
struct iovec headers; struct iovec headers;
headers.iov_base = &file_size; headers.iov_base = &file_size;
headers.iov_len = sizeof(uint32_t); headers.iov_len = sizeof(uint32_t);