mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 13:38:38 -04:00
Tools: wrap _malloc_r on cygwin
fixes dual allocation heap bug See https://cygwin.com/pipermail/cygwin/2000-July/038916.html
This commit is contained in:
parent
db19bce1d2
commit
039367e340
@ -753,8 +753,10 @@ class sitl(Board):
|
||||
]
|
||||
|
||||
# wrap malloc to ensure memory is zeroed
|
||||
# don't do this on MacOS as ld doesn't support --wrap
|
||||
if platform.system() != 'Darwin':
|
||||
if cfg.env.DEST_OS == 'cygwin':
|
||||
# on cygwin we need to wrap _malloc_r instead
|
||||
env.LINKFLAGS += ['-Wl,--wrap,_malloc_r']
|
||||
elif platform.system() != 'Darwin':
|
||||
env.LINKFLAGS += ['-Wl,--wrap,malloc']
|
||||
|
||||
if cfg.options.enable_sfml:
|
||||
|
Loading…
Reference in New Issue
Block a user