summaryrefslogtreecommitdiffstatshomepage
path: root/shared/libc/__errno.c
blob: 86417a02dd045f73407047acac5d941837b79ddd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// This file provides a version of __errno() for embedded systems that do not have one.
// This function is needed for expressions of the form: &errno

static int embed_errno;

#if defined(__linux__)
int *__errno_location(void)
#else
int *__errno(void)
#endif
{
    return &embed_errno;
}