Skip to content

devel/skalibs: fix build failure on DragonFly#1546

Merged
tuxillo merged 1 commit into
masterfrom
agentic/devel-skalibs-20260601-143400Z
Jun 1, 2026
Merged

devel/skalibs: fix build failure on DragonFly#1546
tuxillo merged 1 commit into
masterfrom
agentic/devel-skalibs-20260601-143400Z

Conversation

@dragonflybot

Copy link
Copy Markdown
Member

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.

DragonFly's <sys/event.h> uses the BSD legacy types u_short and u_int, which are not visible when the compiler is invoked with -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700. The port does not define __BSD_VISIBLE or include <sys/types.h> with the appropriate visibility macros before including <sys/event.h>, causing the types to be unknown.

Evidence:

  • From the build log (both bundles):
    In file included from src/include/skalibs/keventbridge.h:11,
                     from src/libplaynice/keventbridge_end.c:10:
    /usr/include/sys/event.h:67:2: error: unknown type name 'u_short'
      u_short  flags;
      ^~~~~~~
    /usr/include/sys/event.h:68:2: error: unknown type name 'u_int'
      u_int  fflags;
      ^~~~~
    
  • The compiler command shows -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700, which hides BSD extensions on DragonFly unless __BSD_VISIBLE is explicitly defined.

Fix

Automated fix for the build failure in devel/skalibs.

What changed

1 file changed, +6/-0

  • ports/devel/skalibs/overlay.dops

Verification

Built successfully in a DragonFly dev-env (dsynth) for target @2026Q2.
Verified 2026-06-01T20:25:22.034067+00:00.

Provenance

  • Operator: operator
  • Agent: model=deepseek/deepseek-v4-pro attempts=1 tokens=213427

> 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`.

DragonFly's `<sys/event.h>` uses the BSD legacy types `u_short` and `u_int`, which are not visible when the compiler is invoked with `-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700`. The port does not define `__BSD_VISIBLE` or include `<sys/types.h>` with the appropriate visibility macros before including `<sys/event.h>`, causing the types to be unknown.

**Evidence:**

- From the build log (both bundles):
  ```
  In file included from src/include/skalibs/keventbridge.h:11,
                   from src/libplaynice/keventbridge_end.c:10:
  /usr/include/sys/event.h:67:2: error: unknown type name 'u_short'
    u_short  flags;
    ^~~~~~~
  /usr/include/sys/event.h:68:2: error: unknown type name 'u_int'
    u_int  fflags;
    ^~~~~
  ```
- The compiler command shows `-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700`, which hides BSD extensions on DragonFly unless `__BSD_VISIBLE` is explicitly defined.

## Fix

Automated fix for the build failure in `devel/skalibs`.

## What changed

1 file changed, +6/-0

- `ports/devel/skalibs/overlay.dops`

## Verification

Built successfully in a DragonFly dev-env (dsynth) for target `@2026Q2`.
Verified 2026-06-01T20:25:22.034067+00:00.

## Provenance

- Operator: operator
- Agent: model=deepseek/deepseek-v4-pro attempts=1 tokens=213427

Signed-off-by: Fred [bot] <github@dragonflybsd.org>
@tuxillo tuxillo marked this pull request as ready for review June 1, 2026 20:27
@tuxillo tuxillo merged commit 088abdd into master Jun 1, 2026
1 of 2 checks passed
@tuxillo tuxillo deleted the agentic/devel-skalibs-20260601-143400Z branch June 1, 2026 23:04
@liweitianux

Copy link
Copy Markdown
Member

As explained by swildner, NEVER define any __XXX macros like the __BSD_VISIBLE here. The correct fix would be:

  • Remove the existing -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
  • Or include <sys/types.h>

@liweitianux

Copy link
Copy Markdown
Member

@tuxillo, I suggest add this rule to the LLM prompt 😃

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.

3 participants