summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/Makefile2
-rw-r--r--libc/sysdeps/linux/common/errno.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 3a66e4c2e..46fd22008 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -28,7 +28,7 @@ LIBC=$(TOPDIR)libc.a
CSRC =closedir.c dirfd.c getdents.c getdnnm.c gethstnm.c getpagesize.c \
isatty.c kernel_version.c mkfifo.c opendir.c readdir.c rewinddir.c \
seekdir.c setegid.c seteuid.c setpgrp.c statfix.c tell.c telldir.c \
- wait.c wait3.c _xmknod.c libc_init.c tcgetatr.c
+ wait.c wait3.c _xmknod.c libc_init.c errno.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
NISRC= _fxstat.c _lxstat.c _xstat.c
diff --git a/libc/sysdeps/linux/common/errno.c b/libc/sysdeps/linux/common/errno.c
new file mode 100644
index 000000000..418fc933b
--- /dev/null
+++ b/libc/sysdeps/linux/common/errno.c
@@ -0,0 +1,8 @@
+#include <errno.h>
+
+int errno = 0;
+
+int * __errno_location ( void )
+{
+ return &errno;
+}