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

--- a/src/metadata.hpp
+++ b/src/metadata.hpp
@@ -41,7 +41,11 @@ namespace zmq
{
public:
+#ifdef __UCLIBCXX_MAJOR__
+ typedef std::map <std::string, std::string> dict_t;
+#else
typedef std::map <std::string, const std::string> dict_t;
+#endif
metadata_t (const dict_t &dict);
virtual ~metadata_t ();
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -30,6 +30,7 @@
#include <new>
#include <string>
#include <algorithm>
+#include <ctype.h>
#include "platform.hpp"
--- a/src/stream_engine.cpp
+++ b/src/stream_engine.cpp
@@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
// Compile metadata.
typedef metadata_t::dict_t properties_t;
properties_t properties;
+#ifdef __UCLIBCXX_MAJOR__
+ properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
+#else
properties.insert(std::make_pair("Peer-Address", peer_address));
+#endif
zmq_assert (metadata == NULL);
metadata = new (std::nothrow) metadata_t (properties);
}
@@ -815,7 +815,11 @@ void zmq::stream_engine_t::mechanism_ready ()
// If we have a peer_address, add it to metadata
if (!peer_address.empty()) {
+#ifdef __UCLIBCXX_MAJOR__
+ properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
+#else
properties.insert(std::make_pair("Peer-Address", peer_address));
+#endif
}
// Add ZAP properties.