Jia Hao a442db2c24 Add missing import for malloc (flutter/engine#56781)
Internal bug: b/380745221

The use of `malloc` in L70:

d48ceb1ba2/third_party/tonic/filesystem/filesystem/file.cc (L70)

Results in the following error, after an update to the internal toolchain. For some reason, this error only appears when targeting Linux.

```
tonic/filesystem/filesystem/file.cc:70:28: error: use of undeclared identifier 'malloc'
   70 |   uint8_t* ptr = (uint8_t*)malloc(file_size);
      |                            ^
1 error generated.
```

This PR fixes it by including the header file.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-11-25 16:47:19 +00:00
..

flutter/third_party

This directory contains third-party code that is a combination of:

  • Code that is vendored into the Flutter repository, from an external source. For example, we might have third_party/glfw, which contains the GLFW library, vendored from an external repository.

    💡 TIP: See DEPS for where these sources are declared.

  • Code that originates from another repository, but is copied (sometimes with alterations) into the Flutter repository. For an example, see third_party/spring_animation.

  • Code that is licensed separately from the rest of the Flutter repository. For example, see third_party/txt.

When adding a new externally sourced third-party library, update .gitignore:

# Ignores all third_party/ directories except for the ones we want to track.

+ !{folder_name}/