diff --git a/nuttx-configs/px4io-v1/scripts/ld.script b/nuttx-configs/px4io-v1/scripts/ld.script index 69c2f9cb2e..1a73b432c1 100755 --- a/nuttx-configs/px4io-v1/scripts/ld.script +++ b/nuttx-configs/px4io-v1/scripts/ld.script @@ -72,6 +72,11 @@ SECTIONS *(.gcc_except_table) *(.gnu.linkonce.r.*) _etext = ABSOLUTE(.); + /* + * This is a hack to make the newlib libm __errno() call + * use the NuttX get_errno_ptr() function. + */ + __errno = get_errno_ptr; } > flash /*