diff --git a/code/errno.c b/code/errno.c index cdb2993..999fd65 100644 --- a/code/errno.c +++ b/code/errno.c @@ -1,4 +1,4 @@ #include -int errno; +_Thread_local int errno; diff --git a/inc/errno.h b/inc/errno.h index 2f846a9..afa3fc7 100644 --- a/inc/errno.h +++ b/inc/errno.h @@ -6,4 +6,4 @@ #define ERANGE 3 // TODO: make it thread-local -extern int errno; +extern _Thread_local int errno;