From c42776f97b126b71a13bb8339988cda09203f589 Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Thu, 20 Feb 2020 13:52:47 -0500 Subject: lib: move OSX specific code to where the values are initially set --- host/lib/include/uhdlib/transport/udp_common.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'host/lib/include') diff --git a/host/lib/include/uhdlib/transport/udp_common.hpp b/host/lib/include/uhdlib/transport/udp_common.hpp index c094fb142..e17deff9e 100644 --- a/host/lib/include/uhdlib/transport/udp_common.hpp +++ b/host/lib/include/uhdlib/transport/udp_common.hpp @@ -268,6 +268,17 @@ inline link_params_t calculate_udp_link_params( link_args.cast("recv_buff_size", link_params.recv_buff_size); } +#if defined(UHD_PLATFORM_MACOS) || defined(UHD_PLATFORM_BSD) + // limit buffer size on OSX to avoid the warning issued by + // resize_buff_helper + if (link_params.recv_buff_size > MAX_BUFF_SIZE_ETH_MACOS) { + link_params.recv_buff_size = MAX_BUFF_SIZE_ETH_MACOS; + } + if (link_params.send_buff_size > MAX_BUFF_SIZE_ETH_MACOS) { + link_params.send_buff_size = MAX_BUFF_SIZE_ETH_MACOS; + } +#endif + return link_params; } -- cgit v1.2.3