diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 0bb7b14826a..828ec00f619 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -59,6 +59,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 59 | #undef fwrite | 59 | #undef fwrite |
| 60 | #endif | 60 | #endif |
| 61 | 61 | ||
| 62 | #ifndef HAVE_H_ERRNO | ||
| 63 | extern int h_errno; | ||
| 64 | #endif | ||
| 65 | |||
| 62 | #include <stdio.h> | 66 | #include <stdio.h> |
| 63 | #include <sys/types.h> | 67 | #include <sys/types.h> |
| 64 | #include <sys/stat.h> | 68 | #include <sys/stat.h> |
| @@ -2040,6 +2044,9 @@ init_system_name () | |||
| 2040 | int count; | 2044 | int count; |
| 2041 | for (count = 0; count < 10; count++) | 2045 | for (count = 0; count < 10; count++) |
| 2042 | { | 2046 | { |
| 2047 | #ifdef TRY_AGAIN | ||
| 2048 | h_errno = 0; | ||
| 2049 | #endif | ||
| 2043 | hp = gethostbyname (hostname); | 2050 | hp = gethostbyname (hostname); |
| 2044 | #ifdef TRY_AGAIN | 2051 | #ifdef TRY_AGAIN |
| 2045 | if (! (hp == 0 && h_errno == TRY_AGAIN)) | 2052 | if (! (hp == 0 && h_errno == TRY_AGAIN)) |