TCP_NOTSENT_LOWAT older kernel compatibility

Motiviation:
TCP_NOTSENT_LOWAT is only supported in linux kernel 3.12 or newer. The addition of this socket option prevents older kernels from building.

Modifications:
- Conditionally define TCP_NOTSENT_LOWAT if it is not defined

Result:
Kernels older than 3.12 can still compile the EPOLL module.
This commit is contained in:
Scott Mitchell 2015-06-02 12:17:32 -07:00
parent 0bd6acc5d8
commit 3c432b5a19

View File

@ -35,6 +35,11 @@
#include "io_netty_channel_epoll_Native.h"
#include "exception_helper.h"
// TCP_NOTSENT_LOWAT is defined in linux 3.12. We define this here so older kernels can compile.
#ifndef TCP_NOTSENT_LOWAT
#define TCP_NOTSENT_LOWAT 25
#endif
/**
* On older Linux kernels, epoll can't handle timeout
* values bigger than (LONG_MAX - 999ULL)/HZ.