fix cygwin compile

This commit is contained in:
U-DESKTOP-T772REH\wangyu 2018-06-18 22:32:43 +08:00
parent f75eb798dc
commit 56727f76b6
3 changed files with 4 additions and 5 deletions

View File

@ -312,9 +312,8 @@ int set_buf_size(int fd,int socket_buf_size,int force_socket_buf)
{ {
if(force_socket_buf) if(force_socket_buf)
{ {
#if defined(__MINGW32__)
assert(0==1); assert(0==1);
#else #if 0
if(setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &socket_buf_size, sizeof(socket_buf_size))<0) if(setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, &socket_buf_size, sizeof(socket_buf_size))<0)
{ {
mylog(log_fatal,"SO_SNDBUFFORCE fail socket_buf_size=%d errno=%s\n",socket_buf_size,strerror(errno)); mylog(log_fatal,"SO_SNDBUFFORCE fail socket_buf_size=%d errno=%s\n",socket_buf_size,strerror(errno));

View File

@ -37,7 +37,6 @@
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
//#include <sys/timerfd.h> //#include <sys/timerfd.h>
//#include <netinet/in.h>
//#include <net/if.h> //#include <net/if.h>
//#include <arpa/inet.h> //#include <arpa/inet.h>
#include <stdarg.h> #include <stdarg.h>
@ -69,6 +68,8 @@ typedef int socklen_t;
#include <sys/socket.h> //for socket ofcourse #include <sys/socket.h> //for socket ofcourse
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif #endif

View File

@ -1033,7 +1033,6 @@ void sigint_cb(struct ev_loop *l, ev_signal *w, int revents)
myexit(0); myexit(0);
} }
#include <winsock2.h>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {