Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 20, 2024

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
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 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 added a commit to vszakats/curl that referenced this pull request Aug 20, 2024
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.

Closes curl#14612
@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