core: Fix compile errors on GCC 14 - #1693
Merged
BareosBot merged 4 commits intoFeb 15, 2024
Merged
Conversation
sebsura
approved these changes
Jan 31, 2024
arogge
force-pushed
the
backport/bareos-23/include-algorithm
branch
from
February 13, 2024 15:07
1316141 to
95b9363
Compare
Starting in GCC 14, it will no longer include <algorithm> by default, resulting in compile errors for various projects. https://gcc.gnu.org/gcc-14/porting_to.html Errors: core/src/cats/sql_get.cc:1309:42: error: cannot convert 'std::vector<std::__cxx11::basic_string<char> >::iterator' to `const char*' 1309 | jobids.erase(std::remove(jobids.begin(), jobids.end(), remove_jobid), core/src/stored/append.cc:78:3: error: `for_each' was not declared in this scope 78 | for_each(attributes_.begin(), attributes_.end(), core/src/dird/ua_prune.cc:897:27: error: `remove_if' is not a member of `std'; did you mean `remove_cv'? 897 | prune_list.erase(std::remove_if(prune_list.begin(), prune_list.end(), Signed-off-by: Christopher Fore <csfore@posteo.net> (cherry picked from commit 3907be7)
(cherry picked from commit fcdaf9f)
(cherry picked from commit 24dff54)
arogge
force-pushed
the
backport/bareos-23/include-algorithm
branch
from
February 15, 2024 10:11
95b9363 to
395ef3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #1687 to bareos-23
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.Source code quality (if there were changes to the original PR)
Backport quality