From: Andrew Oates <[email protected]> A better approach might be to put this in externs.h, guarded with HAVE_ERRNO_H, and put the extern int errno declaration there as well. However many other files do this pattern (unconditionally include <errno.h> and declare extern int errno), so just using that pattern here as well.
This is the only instance where we declare extern int errno but _don't_ include <errno.h> that I can find in the codebase. --- Last one I have for now. lib/sh/winsize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c index ed991ad4..713d58a0 100644 --- a/lib/sh/winsize.c +++ b/lib/sh/winsize.c @@ -53,6 +53,7 @@ # endif /* HAVE_SYS_PTE_H */ #endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ +#include <errno.h> #include <stdio.h> /* Return the fd from which we are actually getting input. */ -- 2.51.2
