mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-21 02:23:38 +08:00
适配非苹果sendfile
This commit is contained in:
6
client.c
6
client.c
@@ -9,8 +9,11 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#if !__APPLE__
|
||||
#include <sys/sendfile.h>
|
||||
#include <sys/sendfile.h>
|
||||
#else
|
||||
struct sf_hdtr hdtr;
|
||||
#endif
|
||||
|
||||
int sockfd;
|
||||
@@ -18,7 +21,6 @@ char buf[BUFSIZ];
|
||||
char bufr[BUFSIZ];
|
||||
struct sockaddr_in their_addr;
|
||||
pthread_t thread;
|
||||
struct sf_hdtr hdtr;
|
||||
uint32_t file_size;
|
||||
int recv_bin = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user