Apparently this define is mentioned in RFC3493 but not in SUS. At least Cygwin
seems not to have this define..
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;
}