fix compile on mac;

This commit is contained in:
dengoswei
2017-01-23 13:49:53 +08:00
parent 808c5c6651
commit 6eb80c7146
3 changed files with 5 additions and 3 deletions

View File

@@ -238,7 +238,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
int ret = 0;
struct timespec t = { 0 };
printf("ptr->events 0x%X\n",ptr->events);
// printf("ptr->events 0x%X\n",ptr->events);
if( EPOLL_CTL_MOD == op )
{
@@ -255,7 +255,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
struct kevent kev = { 0 };
EV_SET( &kev,fd,EVFILT_WRITE,EV_DELETE,0,0,NULL );
ret = kevent( epfd, &kev,1, NULL,0, &t );
printf("delete write ret %d\n",ret );
// printf("delete write ret %d\n",ret );
}
}

View File

@@ -53,6 +53,9 @@ enum EPOLL_EVENTS
EPOLLERR = 0X008,
EPOLLHUP = 0X010,
EPOLLRDNORM = 0x40,
EPOLLWRNORM = 0x004,
};
#define EPOLL_CTL_ADD 1
#define EPOLL_CTL_DEL 2

View File

@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/epoll.h>
#include <errno.h>
#include <string.h>
#include "coctx.h"