Skip to content

ssh: deduplicate SSH backend includes (and fix libssh cmake unity build) - #14612

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-ssh-deprec-unity
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cm-ssh-deprec-unity

Conversation

@vszakats

@vszakats vszakats commented Aug 20, 2024 •

Copy link
Copy Markdown
Member

For libssh, it fixes a "unity" build issue where libssh deprecation
warnings were not suppressed before this patch, because the suppression
macro was only set before just one of the two libssh.h includes.
If the other was compiled first in unity mode, the warnings appeared.

Seen in local curl-for-win build (CW_CONFIG=test-x64-libssh-quictls)
with libssh 0.11.0. (Also in a GHA/macos cmake job upcoming in #14614)

Use this opportunity to drop duplicate SSH header includes from the SSH
modules. It's enough to include them via the common ssh.h header.

For libssh, it fixes a "unity" build issue where libssh deprecation
warnings were not suppressed before this patch, because the suppression
macro was only set before just one of the two `libssh.h` includes.
If the other was compiled first in unity mode, the warnings appeared.

Seen in local curl-for-win build (CW_CONFIG=test-x64-libssh-quictls)
with libssh 0.11.0.

Use this opportunity to drop duplicate SSH header includes from the
SSH modules. It's enough to include them via the common `ssh.h` header.
@vszakats

Copy link
Copy Markdown
Member Author

Came up in CI after adding a libssh cmake macos job:
https://github.com/curl/curl/actions/runs/10473657245/job/29006036486#step:9:1

@vszakats vszakats mentioned this pull request Aug 20, 2024
2 tasks done
@vszakats vszakats changed the title ssh: deduplicate SSH backend includes ssh: deduplicate SSH backend includes (and fix cmake unity builds) Aug 20, 2024
@vszakats vszakats changed the title ssh: deduplicate SSH backend includes (and fix cmake unity builds) ssh: deduplicate SSH backend includes (and fix cmake unity build) Aug 20, 2024
@vszakats vszakats changed the title ssh: deduplicate SSH backend includes (and fix cmake unity build) ssh: deduplicate SSH backend includes (and fix libssh cmake unity build) Aug 20, 2024
@vszakats vszakats closed this in ac207bf Aug 20, 2024
@vszakats
vszakats deleted the cm-ssh-deprec-unity branch August 20, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant