[Midnightbsd-cvs] [MidnightBSD/src] 8b8a33: ck: select sys/limits.h for any _KERNEL build, not...

Lucas Holt noreply at github.com
Thu Jun 11 20:30:11 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 8b8a33bb4eedb8f69f97e7dcc0bbe5dfd8e8bc38
      https://github.com/MidnightBSD/src/commit/8b8a33bb4eedb8f69f97e7dcc0bbe5dfd8e8bc38
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M sys/contrib/ck/include/ck_limits.h

  Log Message:
  -----------
  ck: select sys/limits.h for any _KERNEL build, not just __MidnightBSD__ (#380)

The ck_limits.h kernel branch was gated on defined(__MidnightBSD__), but a
Linux-hosted cross-compile (CI buildkernel) uses a clang that targets
MidnightBSD and predefines __FreeBSD__ — not __MidnightBSD__, and not
__linux__. So it skipped both the linux branch and the MidnightBSD branch
and fell through to `#include <limits.h>`, which fails under -nostdinc:

    contrib/ck/include/ck_limits.h:47:10: fatal error: 'limits.h' file not found

genassym.o (and all kernel objects) are compiled with -D_KERNEL
(sys/conf/kern.pre.mk), so key the BSD branch on _KERNEL: by this point in
the conditional a non-__linux__ _KERNEL build is a BSD kernel, which has
<sys/limits.h>. Fixes native and Linux-cross buildkernel alike.

Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications



More information about the Midnightbsd-cvs mailing list