diff --git a/src/bin/package/PackageInfoPrinter.h b/src/bin/package/PackageInfoPrinter.h index 581bf8ad30..16175a7119 100644 --- a/src/bin/package/PackageInfoPrinter.h +++ b/src/bin/package/PackageInfoPrinter.h @@ -312,9 +312,9 @@ public: printf("\n"); } - void PrintRequires(const BPackageResolvableExpression& requires) const + void PrintRequires(const BPackageResolvableExpression& require) const { - _PrintResolvableExpression("requires", requires); + _PrintResolvableExpression("requires", require); } void PrintSupplements(const BPackageResolvableExpression& supplements) diff --git a/src/kits/package/PackageInfo.cpp b/src/kits/package/PackageInfo.cpp index 018c6545f7..9fe1ce5b43 100644 --- a/src/kits/package/PackageInfo.cpp +++ b/src/kits/package/PackageInfo.cpp @@ -912,10 +912,10 @@ BPackageInfo::ClearRequiresList() status_t -BPackageInfo::AddRequires(const BPackageResolvableExpression& requires) +BPackageInfo::AddRequires(const BPackageResolvableExpression& packageRequires) { BPackageResolvableExpression* newRequires - = new (std::nothrow) BPackageResolvableExpression(requires); + = new (std::nothrow) BPackageResolvableExpression(packageRequires); if (newRequires == NULL) return B_NO_MEMORY; diff --git a/src/kits/package/manager/PackageManager.cpp b/src/kits/package/manager/PackageManager.cpp index 73ae1a423a..84570b0607 100644 --- a/src/kits/package/manager/PackageManager.cpp +++ b/src/kits/package/manager/PackageManager.cpp @@ -726,9 +726,9 @@ BPackageManager::_FindBasePackage(const PackageList& packages, BPackageResolvableExpression* basePackage = NULL; int32 count = info.RequiresList().CountItems(); for (int32 i = 0; i < count; i++) { - BPackageResolvableExpression* requires = info.RequiresList().ItemAt(i); - if (requires->Name() == info.BasePackage()) { - basePackage = requires; + BPackageResolvableExpression* require = info.RequiresList().ItemAt(i); + if (require->Name() == info.BasePackage()) { + basePackage = require; break; } } diff --git a/src/kits/package/solver/libsolv/Jamfile b/src/kits/package/solver/libsolv/Jamfile index 67a673ebd5..9780ecade5 100644 --- a/src/kits/package/solver/libsolv/Jamfile +++ b/src/kits/package/solver/libsolv/Jamfile @@ -28,6 +28,11 @@ for architectureObject in [ MultiArchSubDirSetup ] { be [ TargetLibstdc++ ] ; + if $(TARGET_PACKAGING_ARCH) != x86_gcc2 { + # External headers use the C++20 reserved keyword `requires` + ObjectC++Flags LibsolvSolver.cpp : -Wno-error=c++20-compat ; + } + Includes [ FGristFiles LibsolvSolver.cpp ] : [ BuildFeatureAttribute libsolv : headers ] ; } diff --git a/src/servers/launch/Job.cpp b/src/servers/launch/Job.cpp index b97de58ee5..a2211c21a4 100644 --- a/src/servers/launch/Job.cpp +++ b/src/servers/launch/Job.cpp @@ -254,15 +254,15 @@ Job::Init(const Finder& finder, std::set& dependencies) // Check dependencies for (int32 index = 0; index < Requirements().CountStrings(); index++) { - const BString& requires = Requirements().StringAt(index); - if (dependencies.find(requires) != dependencies.end()) { + const BString& requirement = Requirements().StringAt(index); + if (dependencies.find(requirement) != dependencies.end()) { // Found a cyclic dependency // TODO: log error return fInitStatus = B_ERROR; } - dependencies.insert(requires); + dependencies.insert(requirement); - Job* dependency = finder.FindJob(requires); + Job* dependency = finder.FindJob(requirement); if (dependency != NULL) { std::set subDependencies = dependencies; @@ -274,7 +274,7 @@ Job::Init(const Finder& finder, std::set& dependencies) fInitStatus = _AddRequirement(dependency); } else { - ::Target* target = finder.FindTarget(requires); + ::Target* target = finder.FindTarget(requirement); if (target != NULL) fInitStatus = _AddRequirement(dependency); else {