summaryrefslogtreecommitdiff
path: root/libc/include/reent.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/reent.h')
-rw-r--r--libc/include/reent.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/include/reent.h b/libc/include/reent.h
index c3633ee..ddd19d3 100644
--- a/libc/include/reent.h
+++ b/libc/include/reent.h
@@ -7,10 +7,8 @@ struct _reent {
enum errno_t _errno;
};
-static inline void _REENT_INIT_PTR(struct _reent * reent) {
- reent->_errno = ENOERROR;
-}
-
+static inline void _REENT_INIT_PTR(struct _reent * reent) { reent->_errno = ENOERROR; }
extern struct _reent * _impure_ptr;
+static inline void set_errno(enum errno_t _errno) { _impure_ptr->_errno = errno = _errno; }
#endif