summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 631ee82)
raw | patch | inline | side by side (parent: 631ee82)
author | Florian Forster <octo@verplant.org> | |
Wed, 30 Jan 2008 07:11:12 +0000 (08:11 +0100) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 30 Jan 2008 07:11:12 +0000 (08:11 +0100) |
Apparently this define is mentioned in RFC3493 but not in SUS. At least Cygwin
seems not to have this define..
seems not to have this define..
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index 0371f158b446efb94f3728c5f6c62159f2b36cfb..22ab3a8672167b4d53248c4b92b9646ab82c05ee 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
if (status != 0)
{
ping_set_error (obj, "getaddrinfo",
- status == EAI_SYSTEM
- ? strerror (errno)
- : gai_strerror (status));
+#if defined(EAI_SYSTEM)
+ (status == EAI_SYSTEM)
+ ? strerror (errno) :
+#endif
+ gai_strerror (status));
ret = -1;
break;
}
{
dprintf ("getaddrinfo failed\n");
ping_set_error (obj, "getaddrinfo",
- (ai_return == EAI_SYSTEM)
- ? strerror (errno)
- : gai_strerror (ai_return));
+#if defined(EAI_SYSTEM)
+ (ai_return == EAI_SYSTEM)
+ ? strerror (errno) :
+#endif
+ gai_strerror (ai_return));
ping_free (ph);
return (-1);
}
#endif
)
ret = ENOMEM;
+#if defined(EAI_SYSTEM)
else if (ret == EAI_SYSTEM)
ret = errno;
+#endif
else
ret = EINVAL;
}