[#2558] Define SO_REUSEPORT if not defined

Motivation:

Currently it is impossible to build netty on linux system that not define SO_REUSEPORT even if it is supported.

Modification:

Define SO_REUSEPORT if not defined.

Result:

Possible to build on more linux dists.
This commit is contained in:
Norman Maurer 2014-07-02 09:36:58 +02:00
parent 36b80c25f7
commit 7a05a617f6

View File

@ -21,6 +21,12 @@
#define EPOLL_ACCEPT 0x04 #define EPOLL_ACCEPT 0x04
#define EPOLL_RDHUP 0x08 #define EPOLL_RDHUP 0x08
// Define SO_REUSEPORT if not found to fix build issues.
// See https://github.com/netty/netty/issues/2558
#ifndef SO_REUSEPORT
#define SO_REUSEPORT 15
#endif /* SO_REUSEPORT */
jint Java_io_netty_channel_epoll_Native_eventFd(JNIEnv * env, jclass clazz); jint Java_io_netty_channel_epoll_Native_eventFd(JNIEnv * env, jclass clazz);
void Java_io_netty_channel_epoll_Native_eventFdWrite(JNIEnv * env, jclass clazz, jint fd, jlong value); void Java_io_netty_channel_epoll_Native_eventFdWrite(JNIEnv * env, jclass clazz, jint fd, jlong value);
void Java_io_netty_channel_epoll_Native_eventFdRead(JNIEnv * env, jclass clazz, jint fd); void Java_io_netty_channel_epoll_Native_eventFdRead(JNIEnv * env, jclass clazz, jint fd);