From: Roy Marples <uberlord@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] QA question, undefined reference to _getshort
Date: Wed, 17 Oct 2007 12:06:07 +0100 [thread overview]
Message-ID: <1192619167.12390.2.camel@uberlaptop.marples.name> (raw)
In-Reply-To: <200710171052.48862.hanno@gentoo.org>
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
--
gentoo-dev@gentoo.org mailing list
next prev parent reply other threads:[~2007-10-17 11:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 8:52 [gentoo-dev] QA question, undefined reference to _getshort Hanno Böck
2007-10-17 9:11 ` Rémi Cardona
2007-10-17 11:06 ` Roy Marples [this message]
2007-10-18 14:28 ` Hanno Böck
2007-10-18 14:50 ` Roy Marples
2007-10-18 18:47 ` Lars Weiler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1192619167.12390.2.camel@uberlaptop.marples.name \
--to=uberlord@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox