* add "std::" prefix in headers
* add "using" declarations in .cc files.
so we don't rely on "using namespace std" in one or more included
headers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
#include "common/debug.h"
#include <errno.h>
-// use getentropy() if available. it uses the same source of randomness
-// as /dev/urandom without the filesystem overhead
-#ifdef HAVE_GETENTROPY
-
-#include <unistd.h>
-
using std::ostringstream;
using std::string;
using ceph::bufferptr;
using ceph::Formatter;
+// use getentropy() if available. it uses the same source of randomness
+// as /dev/urandom without the filesystem overhead
+#ifdef HAVE_GETENTROPY
+
+#include <unistd.h>
+
static bool getentropy_works()
{
char buf;
// with a bogus, possibly way into the future, validity
ttl = service_id == CEPH_ENTITY_TYPE_AUTH ?
cct->_conf->auth_mon_ticket_ttl : cct->_conf->auth_service_ticket_ttl;
- ttl = min(ttl, static_cast<double>(
+ ttl = std::min(ttl, static_cast<double>(
secrets.secrets.rbegin()->second.expiration - now));
ldout(cct, 30) << __func__ << " service "