Skip to content

Fix destination enumeration without DNS-SD - #1740

Merged
zdohnal merged 1 commit into
OpenPrinting:2.4.xfrom
chenrui333:fix-no-dnssd-build
Oct 6, 2026
Merged

zdohnal merged 1 commit into
OpenPrinting:2.4.xfrom
chenrui333:fix-no-dnssd-build

Conversation

@chenrui333

Copy link
Copy Markdown

cups_enum_dests accesses num_local and local_dests in the non-DNS-SD path, but _cups_getdata_t does not declare them. Add the fields already present in the DNS-SD data structure so CUPS 2.4.20 builds without DNS-SD support.

Fixes #1739.

AI-assisted with OpenAI Codex (GPT-6). The equivalent patch passed source builds and Homebrew's printer test on Ubuntu 24.04 x86_64 and macOS 26 arm64; validation was performed by AI. No human runtime verification was performed.

Add the local destination fields used by cups_enum_dests to the non-DNS-SD callback data structure.

Fixes OpenPrinting#1739

Signed-off-by: Rui Chen <rui@chenrui.dev>
@chenrui333 chenrui333 mentioned this pull request Oct 6, 2026
7 tasks done
fanboimsft added a commit to sauzerOS/sauzeros that referenced this pull request Oct 6, 2026
2.4.20 uses data.num_local/local_dests in cupsEnumDests() without the
HAVE_DNSSD guard, but only the DNS-SD struct has them, so the cross
build (--disable-avahi) fails to compile dest.c. Apply the upstream fix
from OpenPrinting/cups#1740 (issue #1739).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zdohnal

zdohnal commented Oct 6, 2026

Copy link
Copy Markdown
Member

Thx! We don't have test for this, because 2.5 has hard dependency on dnssd provider, but IMO we can add one test for 2.4.x.

@zdohnal zdohnal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx!

@zdohnal
zdohnal merged commit a197d30 into OpenPrinting:2.4.x Oct 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants