From: Ondrej Sury Date: Wed, 12 Jan 2022 23:04:57 +0000 (+0100) Subject: Disable udp recvmmsg support on systems with MUSL libc X-Git-Tag: v9.18.0~20^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=287ea095f153e05fd0e45c34d4046cea4786f6fa;p=thirdparty%2Fbind9.git Disable udp recvmmsg support on systems with MUSL libc The Linux kernel diverts from the POSIX specification for two members of struct msghdr making them size_t sized (instead of int and socklen_t). In glibc, the developers have decided to use that. However, the MUSL developers used padding for the struct and kept the members defined according to the POSIX. This creates a problem, because libuv doesn't use recvmmsg() library call where the padding members are correctly zeroed and instead calls the syscall directly, the struct msghdr is passed to the kernel with enormous values in those two members (because of the random junk in the padding members) and the syscall thus fail with EMSGSIZE. Disable udp recvmmsg support on systems with MUSL libc until the libuv starts zeroing the struct msghdr before passing it to the syscall. --- diff --git a/configure.ac b/configure.ac index ce8117b15d3..035a7d0cff3 100644 --- a/configure.ac +++ b/configure.ac @@ -553,6 +553,8 @@ PKG_CHECK_MODULES([LIBUV], [libuv >= 1.0.0], [], # libuv recvmmsg support AC_CHECK_DECLS([UV_UDP_RECVMMSG, UV_UDP_MMSG_FREE, UV_UDP_MMSG_CHUNK], [], [], [[#include ]]) +AS_CASE([$host], + [*-musl],[AC_DEFINE([HAVE_DECL_UV_UDP_RECVMMSG], [0], [Disable recvmmsg support on systems with MUSL glibc])]) # [pairwise: --enable-doh --with-libnghttp2=auto, --enable-doh --with-libnghttp2=yes, --disable-doh] AC_ARG_ENABLE([doh],