aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2020-02-20 13:52:47 -0500
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-02-21 09:53:51 -0600
commitc42776f97b126b71a13bb8339988cda09203f589 (patch)
tree00d61ad15471c0bc8387bdf8ffd7515aec03804e /host/lib
parent84bc3a9912f956681adbb90bca51afa2199b0969 (diff)
downloaduhd-c42776f97b126b71a13bb8339988cda09203f589.tar.gz
uhd-c42776f97b126b71a13bb8339988cda09203f589.tar.bz2
uhd-c42776f97b126b71a13bb8339988cda09203f589.zip
lib: move OSX specific code to where the values are initially set
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/include/uhdlib/transport/udp_common.hpp11
1 files changed, 11 insertions, 0 deletions
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<size_t>("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;
}