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

@ -312,9 +312,8 @@ int set_buf_size(int fd,int socket_buf_size,int force_socket_buf)
{
if(force_socket_buf)
{
#if defined(__MINGW32__)
assert(0==1);
#else
assert(0==1);
#if 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));

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

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