From 9e85433e9aa07bebf79ed9d22cf9de8a75c4c038 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 7 Jun 1994 21:40:22 +0000 Subject: [PATCH] added errno definition --- getcwd.c | 6 ++++++ getwd.c | 6 ++++++ realpath.c | 10 ++++++++-- sudo_realpath.c | 10 ++++++++-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/getcwd.c b/getcwd.c index c329f958b..3b36c82cf 100644 --- a/getcwd.c +++ b/getcwd.c @@ -66,6 +66,12 @@ extern int lstat(); #endif /* _PATH_PWD */ +/* + * Since we can't count on this being defined... + */ +extern int errno; + + /****************************************************************** * * getcwd() diff --git a/getwd.c b/getwd.c index c329f958b..3b36c82cf 100644 --- a/getwd.c +++ b/getwd.c @@ -66,6 +66,12 @@ extern int lstat(); #endif /* _PATH_PWD */ +/* + * Since we can't count on this being defined... + */ +extern int errno; + + /****************************************************************** * * getcwd() diff --git a/realpath.c b/realpath.c index 172c786fc..42acf242d 100644 --- a/realpath.c +++ b/realpath.c @@ -69,12 +69,18 @@ extern int lstat(); * Prototypes */ #ifdef HAVE_FCHDIR -static char * realpath_ret(char *, FILE *); +static char * realpath_ret __P((char *, FILE *)); #else -static char * realpath_ret(char *, char *); +static char * realpath_ret __P((char *, char *)); #endif /* HAVE_FCHDIR */ +/* + * Since we can't count on this being defined... + */ +extern int errno; + + /****************************************************************** * * realpath() diff --git a/sudo_realpath.c b/sudo_realpath.c index 172c786fc..42acf242d 100644 --- a/sudo_realpath.c +++ b/sudo_realpath.c @@ -69,12 +69,18 @@ extern int lstat(); * Prototypes */ #ifdef HAVE_FCHDIR -static char * realpath_ret(char *, FILE *); +static char * realpath_ret __P((char *, FILE *)); #else -static char * realpath_ret(char *, char *); +static char * realpath_ret __P((char *, char *)); #endif /* HAVE_FCHDIR */ +/* + * Since we can't count on this being defined... + */ +extern int errno; + + /****************************************************************** * * realpath()