Skip to content

Fix FreeBSD major and minor macro collision - #326

Open
Helshr wants to merge 1 commit into
sdatkinson:mainfrom
Helshr:fix-freebsd-get-dsp
Open

Fix FreeBSD major and minor macro collision#326
Helshr wants to merge 1 commit into
sdatkinson:mainfrom
Helshr:fix-freebsd-get-dsp

Conversation

@Helshr

@Helshr Helshr commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #304

Summary

FreeBSD defines major(x) and minor(x) macros in sys/types.h. Those macros expand the parenthesized member initializers in nam::Version, causing builds that include NAM/get_dsp.h to fail.

Use braced member initialization to avoid the function-like macro expansion while preserving the existing public field names and API.

Tests

  • Added a regression test that defines FreeBSD-style major(x) and minor(x) macros while including NAM/get_dsp.h
  • ./build/tools/run_tests passes successfully

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.

Build on FreeBSD: "minor" and "major" in get_dsp.h cause build error

1 participant