0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

compile windows/old boost

This commit is contained in:
Eliot Horowitz 2010-11-28 03:14:43 -05:00
parent f3fe0ba508
commit d4774cef29

View File

@ -220,12 +220,13 @@ namespace mongo {
}
string _hostNameCached;
void _hostNameCachedInit(){
static void _hostNameCachedInit(){
_hostNameCached = getHostName();
}
boost::once_flag _hostNameCachedInitFlags = BOOST_ONCE_INIT;
string getHostNameCached(){
boost::call_once( _hostNameCachedInit , (boost::once_flag)BOOST_ONCE_INIT );
boost::call_once( _hostNameCachedInit , _hostNameCachedInitFlags );
return _hostNameCached;
}