Added functions to access the errno of the native system when using the newlib C library.
Fixed bug where length did not take into account amount added for alignment requirements.