diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/colors.h | 9 | ||||
-rw-r--r-- | src/dns.c | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/colors.h b/src/colors.h index 99d1bc0f..f350d510 100644 --- a/src/colors.h +++ b/src/colors.h @@ -1,6 +1,15 @@ #ifndef __COLORS_H__ #define __COLORS_H__ +#include "config.h" +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#else +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif +#endif + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -289,10 +289,13 @@ static void *Dns_server(void *data) MSG("DNS error: HOST_NOT_FOUND\n"); else if (error == EAI_AGAIN) MSG("DNS error: TRY_AGAIN\n"); +#ifdef EAI_NODATA + /* Some FreeBSD don't have this anymore */ else if (error == EAI_NODATA) MSG("DNS error: NO_ADDRESS\n"); - else if (h_errno == EAI_FAIL) - MSG("DNS error: NO_RECOVERY\n"); +#endif + else if (h_errno == EAI_FAIL) + MSG("DNS error: NO_RECOVERY\n"); } else { Dns_note_hosts(hosts, res0); dns_server[channel].status = 0; |