Просмотр исходного кода

Make apt compile with clang++ again

This allows us to run the clang static analyzer and to run the
testsuite with the clang MemorySanitizer.
Michael Vogt лет назад: 11
Родитель
Сommit
f8043f219f
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      apt-pkg/aptconfiguration.cc
  2. 1 1
      apt-pkg/srcrecords.cc
  3. 1 1
      methods/ftp.cc

+ 1 - 1
apt-pkg/aptconfiguration.cc

@@ -222,7 +222,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
 	// get the environment language codes: LC_MESSAGES (and later LANGUAGE)
 	// we extract both, a long and a short code and then we will
 	// check if we actually need both (rare) or if the short is enough
-	string const envMsg = string(Locale == 0 ? std::setlocale(LC_MESSAGES, NULL) : *Locale);
+	string const envMsg = string(Locale == 0 ? ::setlocale(LC_MESSAGES, NULL) : *Locale);
 	size_t const lenShort = (envMsg.find('_') != string::npos) ? envMsg.find('_') : 2;
 	size_t const lenLong = (envMsg.find_first_of(".@") != string::npos) ? envMsg.find_first_of(".@") : (lenShort + 3);
 

+ 1 - 1
apt-pkg/srcrecords.cc

@@ -31,7 +31,7 @@
 // SrcRecords::pkgSrcRecords - Constructor				/*{{{*/
 // ---------------------------------------------------------------------
 /* Open all the source index files */
-pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0), Current(0)
+pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : d(NULL), Files(0)
 {
    for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); ++I)
    {

+ 1 - 1
methods/ftp.cc

@@ -745,7 +745,7 @@ bool FTPConn::CreateDataFd()
    }
    
    // Bind and listen
-   if (bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
+   if (::bind(DataListenFd,BindAddr->ai_addr,BindAddr->ai_addrlen) < 0)
    {
       freeaddrinfo(BindAddr);
       return _error->Errno("bind",_("Could not bind a socket"));