summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-27 00:31:03 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-27 00:31:03 +0200
commit6a68315e938eb2611806658828ecea86805822e7 (patch)
tree5ff552cf0e6bac9a35bedaf544cb19332663fa70 /apt-pkg/acquire.cc
parent75d238ba66576c04f257e9d7c0a6995721f1441d (diff)
parent01d207a5076b6fc37a064645b13f2c6550f58b94 (diff)
Merge branch 'portability/freebsd'
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index e588b0306..b4d1b5959 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -80,7 +80,7 @@ void pkgAcquire::Initialize()
if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it
{
struct passwd const * const pw = getpwnam(SandboxUser.c_str());
- struct group const * const gr = getgrnam("root");
+ struct group const * const gr = getgrnam(ROOT_GROUP);
if (pw != NULL && gr != NULL)
{
std::string const AuthConf = _config->FindFile("Dir::Etc::netrc");
@@ -106,7 +106,7 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const
if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it
{
struct passwd const * const pw = getpwnam(SandboxUser.c_str());
- struct group const * const gr = getgrnam("root");
+ struct group const * const gr = getgrnam(ROOT_GROUP);
if (pw != NULL && gr != NULL)
{
// chown the partial dir
@@ -1312,7 +1312,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
// build the status str
std::ostringstream str;
- str.imbue(std::locale("C.UTF-8"));
+ str.imbue(std::locale::classic());
str.precision(4);
str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n';
auto const dlstatus = str.str();