1 // This file provides a version of __errno() for embedded systems that do not have one.
2 // This function is needed for expressions of the form: &errno
3 
4 static int embed_errno;
5 
6 #if defined(__linux__)
__errno_location(void)7 int *__errno_location(void)
8 #else
9 int *__errno(void)
10 #endif
11 {
12     return &embed_errno;
13 }
14