On Wed, 2007-10-17 at 10:52 +0200, Hanno Böck wrote:
> net-analyzer:openvas-libraries-1.0.0:20071013-001835.log- * hg_dns_axfr.c:85:
> warning: implicit declaration of function '_getshort'
>
> The function _getshort is part of glibc, but it's nowhere referenced in the
> headers. It probably should be in resolv.h.
It's a private function - don't use it.
However, it's not overly complex - here's how it ends up
#define NS_GET16(s, cp) do { \
register u_char *t_cp = (u_char *)(cp); \
(s) = ((u_int16_t)t_cp[0] << 8) \
| ((u_int16_t)t_cp[1]) \
; \
(cp) += NS_INT16SZ; \
} while (0)
u_int
ns_get16(const u_char *src) {
u_int dst;
NS_GET16(dst, src);
return (dst);
}
libresolv_hidden_def (ns_get16)
u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
Thanks
Roy
--
[EMAIL PROTECTED] mailing list