Skip to content

fix: building with -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES - #2453

Open
tachalorah wants to merge 2 commits into
rnpgp:mainfrom
tachalorah:main
Open

fix: building with -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES#2453
tachalorah wants to merge 2 commits into
rnpgp:mainfrom
tachalorah:main

Conversation

@tachalorah

Copy link
Copy Markdown

Fixes these missing header errors when building with clang++ -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES:

src/common/file-utils.cpp:346:24: error: use of undeclared identifier
      'getenv'
  346 |     const char *home = getenv("HOME");
      |                        ^~~~~~
1 error generated.
<...>
src/lib/crypto/mem.h:78:32: error: no member named 'calloc' in
      namespace 'std'; did you mean simply 'calloc'?
   78 |         ptr = static_cast<T *>(std::calloc(n, sizeof(T)));
      |                                ^~~~~~~~~~~
      |                                calloc
/usr/include/sched.h:83:8: note: 'calloc' declared here
   83 | void *(calloc)(size_t, size_t);
      |        ^
<...>
src/lib/crypto/mem.h:95:14: error: no type named 'free' in namespace
      'std'
   95 |         std::free(p);
      |         ~~~~~^
2 errors generated.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.36%. Comparing base (8cb2718) to head (72d3feb).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2453      +/-   ##
==========================================
- Coverage   85.36%   85.36%   -0.01%     
==========================================
  Files         126      126              
  Lines       22860    22860              
==========================================
- Hits        19515    19514       -1     
- Misses       3345     3346       +1     

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant