mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-07-02 09:00:27 +08:00
Apple线程安全
This commit is contained in:
3
server.c
3
server.c
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user