diff --git a/dirmngr/dns.c b/dirmngr/dns.c index ae3c3b085..39d3295b0 100644 --- a/dirmngr/dns.c +++ b/dirmngr/dns.c @@ -54,6 +54,9 @@ #endif #include #include +#ifdef TIME_WITH_SYS_TIME +#include /* gettimeofday(2) */ +#endif #else #include /* gettimeofday(2) */ #include /* FD_SETSIZE socklen_t */ @@ -1971,7 +1974,7 @@ void dns_p_dictadd(struct dns_packet *P, unsigned short dn) { static inline uint16_t plus1_ns (uint16_t count_net) { - uint16_t count = ntohs (count); + uint16_t count = ntohs (count_net); count++; return htons (count);