audio/alsa-plugins: fix build failure on DragonFly#1547
Closed
dragonflybot wants to merge 1 commit into
Closed
Conversation
> Generated by the DragonFly agentic build-fix loop and verified in a clean dev-env. Reviewed and accepted by operator `operator` before submission.
## Problem
The build failed on `@2026Q2` — classified `compile-error`, confidence `high`.
The DragonFly‑specific static patch `patch‑oss_pcm__oss.c` removes the `caps` field from `struct snd_pcm_oss`, but the `oss_hw_constraint()` function contains a `#ifdef __FreeBSD__` block with a caps‑free implementation and an `#else` block that still references `oss->caps`. Because DragonFly does not define `__FreeBSD__`, the `#else` path is compiled against the modified struct, triggering the member‑not‑found error.
**Evidence:**
- From `errors.txt` (tail of build log):
```
pcm_oss.c:574:5: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
oss->caps = 0;
^~
pcm_oss.c:575:45: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
if (ioctl(oss->fd, SNDCTL_DSP_GETCAPS, &oss->caps) >= 0) {
^~
pcm_oss.c:576:13: error: 'snd_pcm_oss_t' {aka 'struct snd_pcm_oss'} has no member named 'caps'
if (! (oss->caps & DSP_CAP_TRIGGER))
^~
```
- The existing patch file `ports/audio/alsa-plugins/dragonfly/patch‑oss_pcm__oss.c` shows the struct change and the `+#ifdef __FreeBSD__` guard that does not extend to `__DragonFly__`.
## Fix
Automated fix for the build failure in `audio/alsa-plugins`.
## What changed
3 files changed, +7/-4
- `ports/audio/alsa-plugins/Makefile.DragonFly`
- `ports/audio/alsa-plugins/STATUS`
- `ports/audio/alsa-plugins/overlay.dops`
## Verification
Built successfully in a DragonFly dev-env (dsynth) for target `@2026Q2`.
Verified 2026-06-01T20:24:58.374466+00:00.
## Provenance
- Operator: operator
- Agent: model=deepseek/deepseek-v4-pro attempts=1 tokens=896461
Signed-off-by: Fred [bot] <github@dragonflybsd.org>
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
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.
Problem
The build failed on
@2026Q2— classifiedcompile-error, confidencehigh.The DragonFly‑specific static patch
patch‑oss_pcm__oss.cremoves thecapsfield fromstruct snd_pcm_oss, but theoss_hw_constraint()function contains a#ifdef __FreeBSD__block with a caps‑free implementation and an#elseblock that still referencesoss->caps. Because DragonFly does not define__FreeBSD__, the#elsepath is compiled against the modified struct, triggering the member‑not‑found error.Evidence:
errors.txt(tail of build log):ports/audio/alsa-plugins/dragonfly/patch‑oss_pcm__oss.cshows the struct change and the+#ifdef __FreeBSD__guard that does not extend to__DragonFly__.Fix
Automated fix for the build failure in
audio/alsa-plugins.What changed
3 files changed, +7/-4
ports/audio/alsa-plugins/Makefile.DragonFlyports/audio/alsa-plugins/STATUSports/audio/alsa-plugins/overlay.dopsVerification
Built successfully in a DragonFly dev-env (dsynth) for target
@2026Q2.Verified 2026-06-01T20:24:58.374466+00:00.
Provenance