From 293b812a03723d409d0e19f41d830cf82fc86aa5 Mon Sep 17 00:00:00 2001 From: bumbread Date: Thu, 16 Jun 2022 16:17:19 +1100 Subject: [PATCH] make errno great again --- code/errno.c | 2 +- inc/errno.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;