aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/if_addrs.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-22 12:11:41 -0800
committerJosh Blum <josh@joshknows.com>2011-02-22 12:11:41 -0800
commit8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652 (patch)
tree8b3630a57a9366c414a672a73e47091797dff566 /host/lib/transport/if_addrs.cpp
parent3261b89eeb96a6b87bc35c86be3faf78aee569b0 (diff)
parent9eb19bd9a006c47060b9d0913d2f9d4a49751275 (diff)
downloaduhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.gz
uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.bz2
uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.zip
Merge branch 'usrp2_fw_clock_cleanup' into usrp2_dual_dsp
Diffstat (limited to 'host/lib/transport/if_addrs.cpp')
-rw-r--r--host/lib/transport/if_addrs.cpp16
1 files changed, 8 insertions, 8 deletions
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 <boost/cstdint.hpp>
#include <iostream>
-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 <ifaddrs.h>
static boost::asio::ip::address_v4 sockaddr_to_ip_addr(sockaddr *addr){
@@ -59,10 +55,12 @@ std::vector<uhd::transport::if_addrs_t> 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 <winsock2.h>
std::vector<uhd::transport::if_addrs_t> uhd::transport::get_if_addrs(void){
@@ -98,13 +96,15 @@ std::vector<uhd::transport::if_addrs_t> 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::if_addrs_t> uhd::transport::get_if_addrs(void){
return std::vector<if_addrs_t>();
}
-#endif /* HAVE_IFADDRS_H */
+#endif /* HAVE_IF_ADDRS_DUMMY */