[Midnightbsd-cvs] [MidnightBSD/src] 3514aa: libkern: add abs64() and drop the private copies i...

Lucas Holt noreply at github.com
Fri Sep 25 14:46:40 EDT 2026


  Branch: refs/heads/fix-cross-build-midnightbsd-define
  Home:   https://github.com/MidnightBSD/src
  Commit: 3514aa9a5c278ab01e4269d848bc837963f368c3
      https://github.com/MidnightBSD/src/commit/3514aa9a5c278ab01e4269d848bc837963f368c3
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M sys/compat/linuxkpi/common/include/linux/kernel.h
    M sys/dev/drm2/drm_os_freebsd.h
    M sys/sys/libkern.h

  Log Message:
  -----------
  libkern: add abs64() and drop the private copies in linuxkpi and drm2

cpufreq_dt.c calls abs64(), which this tree only defined privately in
linuxkpi's <linux/kernel.h> and drm2's drm_os_freebsd.h. Every arm64
GENERIC build therefore fails:

    sys/dev/cpufreq/cpufreq_dt.c:116:10: error: call to undeclared function 'abs64'

Provide abs64() in <sys/libkern.h> next to qabs(), as FreeBSD does, and
remove the two duplicate static inlines so headers that include both do
not hit a redefinition error.

Verified: cpufreq_dt.o cross-compiles for aarch64; translation units
including <linux/kernel.h> and <dev/drm2/drmP.h> build with amd64 kernel
flags; sys/modules/linuxkpi linux_compat.o/linux_kmod.o build natively.

AI-Assisted-by: Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply at anthropic.com>
Signed-off-by: Lucas Holt <luke at foolishgames.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