@@ -66,6 +66,7 @@ modified by
6666#include " epoll.h"
6767#include " logging.h"
6868#include " udt.h"
69+ #include " utilities.h"
6970
7071using namespace std ;
7172using namespace srt ::sync;
@@ -639,8 +640,8 @@ int srt::CEPoll::wait(const int eid, set<SRTSOCKET>* readfds, set<SRTSOCKET>* wr
639640#ifdef LINUX
640641 const int max_events = ed.m_sLocals .size ();
641642 SRT_ASSERT (max_events > 0 );
642- epoll_event ev[ max_events] ;
643- int nfds = ::epoll_wait (ed.m_iLocalID , ev, max_events , 0 );
643+ srt::FixedArray< epoll_event> ev ( max_events) ;
644+ int nfds = ::epoll_wait (ed.m_iLocalID , ev. data (), ev. size () , 0 );
644645
645646 IF_HEAVY_LOGGING (const int prev_total = total);
646647 for (int i = 0 ; i < nfds; ++ i)
@@ -662,9 +663,9 @@ int srt::CEPoll::wait(const int eid, set<SRTSOCKET>* readfds, set<SRTSOCKET>* wr
662663 struct timespec tmout = {0 , 0 };
663664 const int max_events = ed.m_sLocals .size ();
664665 SRT_ASSERT (max_events > 0 );
665- struct kevent ke[ max_events] ;
666+ srt::FixedArray< struct kevent > ke ( max_events) ;
666667
667- int nfds = kevent (ed.m_iLocalID , NULL , 0 , ke, max_events , &tmout);
668+ int nfds = kevent (ed.m_iLocalID , NULL , 0 , ke. data (), ke. size () , &tmout);
668669 IF_HEAVY_LOGGING (const int prev_total = total);
669670
670671 for (int i = 0 ; i < nfds; ++ i)
0 commit comments