From a8bb5ec900d8f2d3d2f274a921d19b564c668323 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 21 Feb 2011 19:03:13 -0800 Subject: uhd: replace header checks in cmake files with more robust compile checks for features implemented different ifdefs in the cpp files --- host/lib/transport/if_addrs.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'host/lib/transport/if_addrs.cpp') diff --git a/host/lib/transport/if_addrs.cpp b/host/lib/transport/if_addrs.cpp index 17cf8455b..b7c8ad844 100644 --- a/host/lib/transport/if_addrs.cpp +++ b/host/lib/transport/if_addrs.cpp @@ -20,14 +20,10 @@ #include #include -uhd::transport::if_addrs_t::if_addrs_t(void){ - /* NOP */ -} - /*********************************************************************** * Interface address discovery through ifaddrs api **********************************************************************/ -#if defined(HAVE_IFADDRS_H) +#ifdef HAVE_GETIFADDRS #include static boost::asio::ip::address_v4 sockaddr_to_ip_addr(sockaddr *addr){ @@ -59,10 +55,12 @@ std::vector uhd::transport::get_if_addrs(void){ return if_addrs; } +#endif /* HAVE_GETIFADDRS */ + /*********************************************************************** * Interface address discovery through windows api **********************************************************************/ -#elif defined(HAVE_WINSOCK2_H) +#ifdef HAVE_SIO_GET_INTERFACE_LIST #include std::vector uhd::transport::get_if_addrs(void){ @@ -98,13 +96,15 @@ std::vector uhd::transport::get_if_addrs(void){ return if_addrs; } +#endif /* HAVE_SIO_GET_INTERFACE_LIST */ + /*********************************************************************** * Interface address discovery not included **********************************************************************/ -#else /* HAVE_IFADDRS_H */ +#ifdef HAVE_IF_ADDRS_DUMMY std::vector uhd::transport::get_if_addrs(void){ return std::vector(); } -#endif /* HAVE_IFADDRS_H */ +#endif /* HAVE_IF_ADDRS_DUMMY */ -- cgit v1.2.3