From 1ab23739ad57b51c42ef8eb5e5ffb9de70106635 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 3 Oct 2015 17:26:04 +0200 Subject: [PATCH] IOv1: Error handling pointer hackery --- nuttx-configs/px4io-v1/scripts/ld.script | 5 +++++ 1 file changed, 5 insertions(+) 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 /*