From 755569e66f7a939aa9392a79bf637d823fb78b84 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 17 Nov 2010 09:03:25 -0800 Subject: uhd: ranges symbol fix, try extern macro --- host/lib/types.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/lib') diff --git a/host/lib/types.cpp b/host/lib/types.cpp index 8ccb664d5..bea20a4aa 100644 --- a/host/lib/types.cpp +++ b/host/lib/types.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,12 @@ using namespace uhd; +/*********************************************************************** + * ranges template instantiation + **********************************************************************/ +template struct uhd::meta_range_t; +template struct uhd::meta_range_t; + /*********************************************************************** * tune request **********************************************************************/ -- cgit v1.2.3 From d7317dac9360f26444da4043ca066a46749917b3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 17 Nov 2010 09:21:04 -0800 Subject: udp: added polling alternative to select for mac --- host/lib/transport/udp_simple.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'host/lib') diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 5829b462b..6799ac7b2 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -35,6 +35,8 @@ using namespace uhd::transport; static bool wait_available( boost::asio::ip::udp::socket &socket, double timeout ){ + #if defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32) + //setup timeval for timeout timeval tv; tv.tv_sec = 0; @@ -46,6 +48,17 @@ static bool wait_available( FD_SET(socket.native(), &rset); return ::select(socket.native()+1, &rset, NULL, NULL, &tv) > 0; + + #else /*defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)*/ + + //FIXME: why does select fail on macintosh? + for (size_t i = 0; i < size_t(timeout*1e3); i++){ + if (socket.available()) return true; + boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + } + return false; + + #endif /*defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)*/ } /*********************************************************************** -- cgit v1.2.3