aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-host-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-host-utils.c')
-rw-r--r--e-util/e-host-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/e-util/e-host-utils.c b/e-util/e-host-utils.c
index d20261e5a6..108a732b83 100644
--- a/e-util/e-host-utils.c
+++ b/e-util/e-host-utils.c
@@ -57,7 +57,12 @@ e_gethostbyname_r (const char *name, struct hostent *host,
return errno;
#else
struct hostent *hp;
- return gethostbyname_r(name, host, buf, buflen, &hp, herr);
+ int retval;
+
+ retval = gethostbyname_r(name, host, buf, buflen, &hp, herr);
+ if (hp != NULL)
+ *herr = 0;
+ return retval;
#endif
#else
int i;