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.

50 lines
1.5 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/socket_base.cpp
  14. +++ b/src/socket_base.cpp
  15. @@ -30,6 +30,7 @@
  16. #include <new>
  17. #include <string>
  18. #include <algorithm>
  19. +#include <ctype.h>
  20. #include "platform.hpp"
  21. --- a/src/stream_engine.cpp
  22. +++ b/src/stream_engine.cpp
  23. @@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
  24. // Compile metadata.
  25. typedef metadata_t::dict_t properties_t;
  26. properties_t properties;
  27. +#ifdef __UCLIBCXX_MAJOR__
  28. + properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
  29. +#else
  30. properties.insert(std::make_pair("Peer-Address", peer_address));
  31. +#endif
  32. zmq_assert (metadata == NULL);
  33. metadata = new (std::nothrow) metadata_t (properties);
  34. }
  35. @@ -815,7 +815,11 @@ void zmq::stream_engine_t::mechanism_ready ()
  36. // If we have a peer_address, add it to metadata
  37. if (!peer_address.empty()) {
  38. +#ifdef __UCLIBCXX_MAJOR__
  39. + properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
  40. +#else
  41. properties.insert(std::make_pair("Peer-Address", peer_address));
  42. +#endif
  43. }
  44. // Add ZAP properties.