You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.4 KiB

  1. --- a/src/metadata.hpp
  2. +++ b/src/metadata.hpp
  3. @@ -41,7 +41,11 @@ namespace zmq
  4. {
  5. public:
  6. +#ifdef __UCLIBCXX_MAJOR__
  7. + typedef std::map <std::string, std::string> dict_t;
  8. +#else
  9. typedef std::map <std::string, const std::string> dict_t;
  10. +#endif
  11. metadata_t (const dict_t &dict);
  12. virtual ~metadata_t ();
  13. --- a/src/stream_engine.cpp
  14. +++ b/src/stream_engine.cpp
  15. @@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
  16. // Compile metadata.
  17. typedef metadata_t::dict_t properties_t;
  18. properties_t properties;
  19. +#ifdef __UCLIBCXX_MAJOR__
  20. + properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
  21. +#else
  22. properties.insert(std::make_pair("Peer-Address", peer_address));
  23. +#endif
  24. zmq_assert (metadata == NULL);
  25. metadata = new (std::nothrow) metadata_t (properties);
  26. }
  27. @@ -824,7 +828,11 @@ void zmq::stream_engine_t::mechanism_ready ()
  28. // If we have a peer_address, add it to metadata
  29. if (!peer_address.empty()) {
  30. +#ifdef __UCLIBCXX_MAJOR__
  31. + properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
  32. +#else
  33. properties.insert(std::make_pair("Peer-Address", peer_address));
  34. +#endif
  35. }
  36. // Add ZAP properties.