summaryrefslogtreecommitdiffstats
path: root/include/errno.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/errno.h')
-rw-r--r--include/errno.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/errno.h b/include/errno.h
index 262c9fc3eb..12e526a0d7 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -2,13 +2,19 @@
#ifndef __ERRNO_H
#define __ERRNO_H
-#include <asm-generic/errno.h>
+#include <linux/errno.h>
#include <linux/err.h>
extern int errno;
void perror(const char *s);
-const char *errno_str(void);
const char *strerror(int errnum);
+static inline int errno_set(int err)
+{
+ if (err < 0)
+ errno = -err;
+ return err;
+}
+
#endif /* __ERRNO_H */