diff --git a/daemon/face/ethernet-face.cpp b/daemon/face/ethernet-face.cpp index 05d1f71..3e2ae99 100644 --- a/daemon/face/ethernet-face.cpp +++ b/daemon/face/ethernet-face.cpp @@ -29,7 +29,7 @@ #include #include // for errno -#include // for std::snprintf() +#include #include // for std::strerror() and std::strncpy() #include // for htons() and ntohs() #include // for struct ether_header @@ -96,11 +96,13 @@ EthernetFace::EthernetFace(boost::asio::posix::stream_descriptor socket, m_slicer.reset(new ndnlp::Slicer(m_interfaceMtu)); char filter[100]; - std::snprintf(filter, sizeof(filter), - "(ether proto 0x%x) && (ether dst %s) && (not ether src %s)", - ethernet::ETHERTYPE_NDN, - m_destAddress.toString().c_str(), - m_srcAddress.toString().c_str()); + // - std::snprintf not found in some environments + // http://redmine.named-data.net/issues/2299 for more information + snprintf(filter, sizeof(filter), + "(ether proto 0x%x) && (ether dst %s) && (not ether src %s)", + ethernet::ETHERTYPE_NDN, + m_destAddress.toString().c_str(), + m_srcAddress.toString().c_str()); setPacketFilter(filter); if (!m_destAddress.isBroadcast() && !joinMulticastGroup())