GrapheneOS / hardened_malloc

Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.
https://grapheneos.org/
MIT License
1.26k stars 96 forks source link

Fix CPPFLAGS in test Makefile #151

Closed thithib closed 2 years ago

thithib commented 2 years ago

In particular, the _GNU_SOURCE feature test macro needs to be set in order to correctly define mmap(2) flags such as MAP_ANONYMOUS. Otherwise, compilation of some test files fails when CPPFLAGS is not defined in the initial user environment, as Make then does not export it from the root Makefile to the sub-make.

thestinger commented 2 years ago

By the way, the main branch is the best one to submit PRs since the 12 branch is just rebased on top of that with any necessary workarounds for device-specific issues, etc. The branches will be identical soon since we'll no longer need the workaround for the Qualcomm camera drivers on the 3rd generation Pixels.

thestinger commented 2 years ago

Ah, I see the problem. I accidentally changed the default branch from main to 12 when switching the default branch from 11 to 12 across all the GrapheneOS repositories since this one was wrongly included in the list for the script.