From 89a14d0b1a860ec7f2b167d16e743391774e4207 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 16 Oct 2008 14:41:16 +0000 Subject: Compile boost.spirit library in thread-safe mode. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705257 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/Url.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/Url.cpp') diff --git a/cpp/src/qpid/Url.cpp b/cpp/src/qpid/Url.cpp index 422939fdf4..22e81b3adc 100644 --- a/cpp/src/qpid/Url.cpp +++ b/cpp/src/qpid/Url.cpp @@ -23,6 +23,8 @@ #include "qpid/sys/StrError.h" #include // NB: must be before boost/spirit headers. +#define BOOST_SPIRIT_THREADSAFE + #include #include @@ -43,7 +45,7 @@ std::ostream& operator<<(std::ostream& os, const TcpAddress& a) { std::istream& operator>>(std::istream&, const TcpAddress&); Url Url::getHostNameUrl(uint16_t port) { - TcpAddress address("", port); + TcpAddress address(std::string(), port); if (!sys::SystemInfo::getLocalHostname(address)) throw InvalidUrl(QPID_MSG("Cannot get host name: " << qpid::sys::strError(errno))); return Url(address); -- cgit v1.2.1