1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-09 02:30:25 +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__
#include <sys/sendfile.h>
#else
struct sf_hdtr hdtr;
#endif
#define PASSWORD "fumiama"
@@ -129,6 +127,7 @@ int sendAll(char* file_path, THREADTIMER *timer) {
printf("Get file size: %u bytes.\n", file_size);
off_t len = 0;
#if __APPLE__
struct sf_hdtr hdtr;
struct iovec headers;
headers.iov_base = &file_size;
headers.iov_len = sizeof(uint32_t);