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

Open Beginner friendly
#304 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp

Research direction

Inspect get_dsp.h and the declarations that use the minor and major identifiers. Reproduce the FreeBSD build error with a target that includes this header, then verify the identifiers no longer conflict with sys/types.h and that the affected build succeeds.

Written by the indexing model from the issue text.

Description

When trying to build on FreeBSD, these two identifiers are already defined as macros by sys/types.h, which causes errors on anything that #include's both:

member initializer '__major' does not name a non-static data member or base class

Maybe they should be renamed to something like "minor_version" and "major_version"? Current workaround is to just #undef them in get_dsp.h after the headers.

Dominant language
C++
Stars
931
Forks
178
Avg merge
3h 31m
Merged PRs (30d)
7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sdatkinson/NeuralAmpModelerCore

All issues in sdatkinson/NeuralAmpModelerCore

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.