summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-16 10:06:27 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-16 10:06:27 +0000
commit705ce36d85df6a6ab0f881a89797a5a88bd0422a (patch)
treea892a8176b72693e5e84f66ca93fcb3ed041f94c /libc/sysdeps/linux/common
parent31c580aa61615bcea5625ae884db7ad965bb1829 (diff)
Added common handling of errno.
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;
+}