Skip to content

Commit c7f53ad

Browse files
authored
Merge pull request Tencent#16 from dengoswei/master
fix compile on mac;
2 parents 808c5c6 + 6eb80c7 commit c7f53ad

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

co_epoll.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
238238
int ret = 0;
239239
struct timespec t = { 0 };
240240

241-
printf("ptr->events 0x%X\n",ptr->events);
241+
// printf("ptr->events 0x%X\n",ptr->events);
242242

243243
if( EPOLL_CTL_MOD == op )
244244
{
@@ -255,7 +255,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
255255
struct kevent kev = { 0 };
256256
EV_SET( &kev,fd,EVFILT_WRITE,EV_DELETE,0,0,NULL );
257257
ret = kevent( epfd, &kev,1, NULL,0, &t );
258-
printf("delete write ret %d\n",ret );
258+
// printf("delete write ret %d\n",ret );
259259
}
260260
}
261261

co_epoll.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ enum EPOLL_EVENTS
5353

5454
EPOLLERR = 0X008,
5555
EPOLLHUP = 0X010,
56+
57+
EPOLLRDNORM = 0x40,
58+
EPOLLWRNORM = 0x004,
5659
};
5760
#define EPOLL_CTL_ADD 1
5861
#define EPOLL_CTL_DEL 2

example_copystack.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <stdlib.h>
2121
#include <unistd.h>
2222
#include <sys/time.h>
23-
#include <sys/epoll.h>
2423
#include <errno.h>
2524
#include <string.h>
2625
#include "coctx.h"

0 commit comments

Comments
 (0)