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()