diff --git a/transport-native-epoll/src/main/c/netty_epoll_native.c b/transport-native-epoll/src/main/c/netty_epoll_native.c index 13378ac8ba..7367f0bed2 100644 --- a/transport-native-epoll/src/main/c/netty_epoll_native.c +++ b/transport-native-epoll/src/main/c/netty_epoll_native.c @@ -636,7 +636,9 @@ static jint netty_epoll_native_uioMaxIov(JNIEnv* env, jclass clazz) { } static jboolean netty_epoll_native_isSupportingSendmmsg(JNIEnv* env, jclass clazz) { - if (sendmmsg) { + // Use & to avoid warnings with -Wtautological-pointer-compare when sendmmsg is + // not weakly defined. + if (&sendmmsg != NULL) { return JNI_TRUE; } return JNI_FALSE;