Skip to content

build: replace sprintf by snprintf due to upgraded MacOS compiler, change linking of googletest#1361

Merged
pstorz merged 3 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-build
Jan 23, 2023
Merged

build: replace sprintf by snprintf due to upgraded MacOS compiler, change linking of googletest#1361
pstorz merged 3 commits intobareos:masterfrom
arogge:dev/arogge/master/fix-build

Conversation

@arogge
Copy link
Member

@arogge arogge commented Jan 23, 2023

Fix broken build due to MacOS deprecating sprintf() and missing dependency to Threads::Threads (that was uncovered when switching googletest from static to dynamic linking)

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@arogge arogge requested a review from pstorz January 23, 2023 11:51
@pstorz pstorz changed the title Fix broken build due to upgraded MacOS compiler and changed googletest linking build: replace sprintf by snprintf due to upgraded MacOS compiler, change linking of googletest Jan 23, 2023
@pstorz pstorz force-pushed the dev/arogge/master/fix-build branch from 77a46a5 to 182fe5d Compare January 23, 2023 15:03
Make the dependency from stored_objects to Threads::Threads explicit.
@arogge arogge force-pushed the dev/arogge/master/fix-build branch from 182fe5d to 0bb53ae Compare January 23, 2023 15:07
Newer MacOS compilers consider sprintf() deprecated. This patch replaces
the uses of sprintf() with snprintf() for all code that is compiled for
the file daemon on MacOS.
@arogge arogge force-pushed the dev/arogge/master/fix-build branch from 0bb53ae to 495dfd7 Compare January 23, 2023 15:11
@pstorz pstorz merged commit b849274 into bareos:master Jan 23, 2023
@arogge arogge deleted the dev/arogge/master/fix-build branch January 23, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants