소스 검색

HPCC-9415 Use epoll, add EPOLLRDHUP define for Centos5.x

Also fix Windows build break

Signed-off-by: Mark Kelly <mark.kelly@lexisnexis.com>
Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Mark Kelly 11 년 전
부모
커밋
0b74b9c503
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      system/jlib/jsocket.cpp

+ 7 - 2
system/jlib/jsocket.cpp

@@ -75,6 +75,10 @@
 #  include <unistd.h>
 #  include <sys/epoll.h>
 //#  define EPOLLTRACE
+#  ifndef EPOLLRDHUP
+//  Centos 5.x bug - epoll.h does not define but its in the kernel
+#   define EPOLLRDHUP 0x2000
+#  endif
 # endif
 #endif
 
@@ -3655,6 +3659,7 @@ public:
         return ret;
     }
 
+    virtual void closedummy() = 0;
 };
 
 class CSocketSelectThread: public CSocketBaseThread
@@ -4704,9 +4709,9 @@ ISocketSelectHandler *createSocketSelectHandler(const char *trc)
         }
     }
     if (epoll_method == EPOLL_ENABLED)
-      return new CSocketEpollHandler(trc);
+        return new CSocketEpollHandler(trc);
     else
-      return new CSocketSelectHandler(trc);
+        return new CSocketSelectHandler(trc);
 #else
     return new CSocketSelectHandler(trc);
 #endif