-
Notifications
You must be signed in to change notification settings - Fork 190
Cherry pick fixes related to macos_unit_tests (3.21) #5888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
craigcomstock
wants to merge
9
commits into
cfengine:3.21.x
Choose a base branch
from
craigcomstock:macos-unittest-fixes/3.21
base: 3.21.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Cherry pick fixes related to macos_unit_tests (3.21) #5888
craigcomstock
wants to merge
9
commits into
cfengine:3.21.x
from
craigcomstock:macos-unittest-fixes/3.21
Conversation
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
…bundle-fix/3.21.x examples/services: Fix service_bundle example (3.21)
The function 'strchrnul' has been marked as being introduced in macOS
15.4, although it seems to have been working for as long as we have been
testing on macOS. Since warnings are treated as errors, the build will
fail. Hence, the simplest way to silence the warning is, it to specify
the deployment target to be a minimum of macOS 15.4.
```
logging.c:651:28: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new]
651 | char *next_token = strchrnul(token, ',');
CC queue.lo
| ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
198 | strchrnul(const char *__s, int __c);
CC rb-tree.lo
| ^
logging.c:651:28: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
651 | char *next_token = strchrnul(token, ',');
| ^~~~~~~~~
1 error generated.
```
It has been done similarly here: NorthernTechHQ/libntech#255
Signed-off-by: Victor Moene <victor.moene@northern.tech>
(cherry picked from commit f1c9a91)
(cherry picked from commit 6ae1a56)
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech> (cherry picked from commit 1486c24) Conflicts: .github/workflows/macos_unit_tests.yml Use of librsync (cfengine#5629) was not cherry picked to 3.24.x (cherry picked from commit d91eebd) Conflicts: .github/workflows/macos_unit_tests.yml Had to adjust as 3.21 uses pcre not pcre2 as the commit from newer branch had.
Check for Homebrew if we're on Darwin and use brew's --prefix. Ticket: CFE-4385 (cherry picked from commit 7e88d4b) Conflicts: .github/workflows/macos_unit_tests.yml configure.ac using librsync (cfengine#5629) was not cherry-picked to 3.24.x so adjustments were needed. (cherry picked from commit faf08d9) Conflicts: .github/workflows/macos_unit_tests.yml configure.ac Needed some finesse as rsync and pcre2 were in commit and not used in 3.21.
The argument checking has been present for a while. Interestingly 3 days ago there was a commit to silence many of these warnings: curl/curl@92f215f Ticket: CFE-3429 Changelog: none (cherry picked from commit c952969)
|
Thank you for submitting a PR! Maybe @larsewi can review this? |
|
Marking this PR as stale due to inactivity; it will be closed in 7 days. |
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.
No description provided.