banan-os/userspace/libraries/LibC/errno.cpp

13 lines
176 B
C++

#include <errno.h>
#if __disable_thread_local_storage
static int s_errno = 0;
#else
static thread_local int s_errno = 0;
#endif
int* __errno_location()
{
return &s_errno;
}