diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-17 17:55:20 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-17 17:55:20 -0800 |
commit | 69aaffa6d8d4614dbf6b751fe058e39fced68153 (patch) | |
tree | 1a3958527b79eeb0297146dccff7fd76b0f46a7f /host/lib/device_addr.cpp | |
parent | 83c463d09613b72817a837117c5f0b23975c8def (diff) | |
download | uhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.tar.gz uhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.tar.bz2 uhd-69aaffa6d8d4614dbf6b751fe058e39fced68153.zip |
got uhd almost compiling in windowze. figured out special flags. also had to use boost stdint because its missing in visual c++, added a bunch of numeric casts to reduce warnings
Diffstat (limited to 'host/lib/device_addr.cpp')
-rw-r--r-- | host/lib/device_addr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/device_addr.cpp b/host/lib/device_addr.cpp index 9514df981..d26bb4b9d 100644 --- a/host/lib/device_addr.cpp +++ b/host/lib/device_addr.cpp @@ -28,7 +28,7 @@ uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ std::string mac_addr_str = (mac_addr_str_ == "")? "ff:ff:ff:ff:ff:ff" : mac_addr_str_; //ether_aton_r(str.c_str(), &mac_addr); - uint8_t p[6] = {0x00, 0x50, 0xC2, 0x85, 0x30, 0x00}; // Matt's IAB + boost::uint8_t p[6] = {0x00, 0x50, 0xC2, 0x85, 0x30, 0x00}; // Matt's IAB try{ //only allow patterns of xx:xx or xx:xx:xx:xx:xx:xx @@ -43,7 +43,7 @@ uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ int hex_num; std::istringstream iss(hex_strs[i]); iss >> std::hex >> hex_num; - p[i] = uint8_t(hex_num); + p[i] = boost::uint8_t(hex_num); } } @@ -58,7 +58,7 @@ uhd::mac_addr_t::mac_addr_t(const std::string &mac_addr_str_){ std::string uhd::mac_addr_t::to_string(void) const{ //ether_ntoa_r(&mac_addr, addr_buf); - const uint8_t *p = reinterpret_cast<const uint8_t *>(&mac_addr); + const boost::uint8_t *p = reinterpret_cast<const boost::uint8_t *>(&mac_addr); return str( boost::format("%02x:%02x:%02x:%02x:%02x:%02x") % int(p[0]) % int(p[1]) % int(p[2]) |