Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d041bcc authored by Sharjeel Khan's avatar Sharjeel Khan
Browse files

Force null_driver.cpp to use _FORTIFY_SOURCE=2

We plan to make _FORTIFY_SOURCE=3 global on device. The null_driver.cpp
file uses malloc_usable_size and this particular case does not work with
_FORTIFY_SOURCE=3. We redefine it to 2 for only this file.

Flag: EXEMPT bugfix
Bug: 291762537
Test: build with ag/32745870 and presubmit
Change-Id: I8a31ba5f367f2a239f19b0fe33c9bc1f6bc8b97c
parent 205a5ad8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,11 @@
 * limitations under the License.
 */

// (b/291762537): This code uses malloc_usable_size(), and thus can't be
// built with _FORTIFY_SOURCE=3.
#undef _FORTIFY_SOURCE
#define _FORTIFY_SOURCE 2

#include <android/hardware_buffer.h>
#include <hardware/hwvulkan.h>