1 |
On Wed, 2007-10-17 at 10:52 +0200, Hanno Böck wrote: |
2 |
> net-analyzer:openvas-libraries-1.0.0:20071013-001835.log- * hg_dns_axfr.c:85: |
3 |
> warning: implicit declaration of function '_getshort' |
4 |
> |
5 |
> The function _getshort is part of glibc, but it's nowhere referenced in the |
6 |
> headers. It probably should be in resolv.h. |
7 |
|
8 |
It's a private function - don't use it. |
9 |
|
10 |
However, it's not overly complex - here's how it ends up |
11 |
|
12 |
#define NS_GET16(s, cp) do { \ |
13 |
register u_char *t_cp = (u_char *)(cp); \ |
14 |
(s) = ((u_int16_t)t_cp[0] << 8) \ |
15 |
| ((u_int16_t)t_cp[1]) \ |
16 |
; \ |
17 |
(cp) += NS_INT16SZ; \ |
18 |
} while (0) |
19 |
|
20 |
|
21 |
u_int |
22 |
ns_get16(const u_char *src) { |
23 |
u_int dst; |
24 |
|
25 |
NS_GET16(dst, src); |
26 |
return (dst); |
27 |
} |
28 |
libresolv_hidden_def (ns_get16) |
29 |
|
30 |
u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); } |
31 |
|
32 |
Thanks |
33 |
|
34 |
Roy |
35 |
|
36 |
-- |
37 |
gentoo-dev@g.o mailing list |