mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 17:15:07 -05:00
ntp: add support for recvmmsg()
This is used to read multiple packets with one system call. It should work on Linux and NetBSD.
This commit is contained in:
14
configure
vendored
14
configure
vendored
@@ -589,6 +589,20 @@ if test_code 'arc4random_buf()' 'stdlib.h' '' '' 'arc4random_buf(NULL, 0);'; the
|
||||
add_def HAVE_ARC4RANDOM
|
||||
fi
|
||||
|
||||
RECVMMSG_CODE='
|
||||
struct mmsghdr hdr;
|
||||
return !recvmmsg(0, &hdr, 1, MSG_DONTWAIT, 0);'
|
||||
if test_code 'recvmmsg()' 'sys/socket.h' '' "$EXTRA_LIBS" "$RECVMMSG_CODE"; then
|
||||
add_def HAVE_RECVMMSG
|
||||
else
|
||||
if test_code 'recvmmsg() with _GNU_SOURCE' 'sys/socket.h' '-D_GNU_SOURCE' \
|
||||
"$EXTRA_LIBS" "$RECVMMSG_CODE"
|
||||
then
|
||||
add_def _GNU_SOURCE
|
||||
add_def HAVE_RECVMMSG
|
||||
fi
|
||||
fi
|
||||
|
||||
timepps_h=""
|
||||
if [ $feat_refclock = "1" ] && [ $feat_pps = "1" ]; then
|
||||
if test_code '<sys/timepps.h>' 'sys/timepps.h' '' '' ''; then
|
||||
|
||||
Reference in New Issue
Block a user