Skip to content

Fix invalid macro definition and add <tuple> include #4012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 28, 2025

Conversation

xmkg
Copy link
Member

@xmkg xmkg commented Mar 27, 2025

Author: @rshrj

This MP contains two external MPs:

#4008:

This PR fixes an issue in src/platform/CMakeLists.txt where add_compile_definitions() is used with a -D prefix:

add_compile_definitions(-DMULTIPASS_JOURNALD_ENABLED)

This results in a malformed macro definition -D-DMULTIPASS_JOURNALD_ENABLED, which causes a compiler error:

<command-line>: error: macro names must be identifiers

The fix is to pass only the macro name, as add_compile_definitions() automatically adds the -D prefix:

add_compile_definitions(MULTIPASS_JOURNALD_ENABLED)

Tested in a clean Debian 12 environment using Make, where this issue was originally triggered.

#4009:

This PR adds a missing #include <tuple> to network_interface_info.h, which is required for the use of std::tie.

Without this include, builds fail on compilers/environments that do not implicitly include <tuple> via transitive headers. For example, GCC on Debian 12 produces:

error: ‘tie’ is not a member of ‘std’
note: ‘std::tie’ is defined in header ‘’; did you forget to ‘#include ’?

Tested by successfully building the project in a clean Debian 12 dev container with GCC. No other changes.

Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.26%. Comparing base (23e6620) to head (339bd22).
Report is 3495 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4012   +/-   ##
=======================================
  Coverage   89.26%   89.26%           
=======================================
  Files         260      260           
  Lines       14693    14693           
=======================================
  Hits        13116    13116           
  Misses       1577     1577           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rshrj!

@ricab ricab enabled auto-merge March 27, 2025 20:19
@ricab ricab added this pull request to the merge queue Mar 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 27, 2025
@xmkg xmkg added this pull request to the merge queue Mar 27, 2025
Merged via the queue into main with commit ab399ad Mar 28, 2025
16 checks passed
@xmkg xmkg deleted the fix/rshrj-tuple-and-cmake-macro branch March 28, 2025 00:15
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.

3 participants