This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot build problem
- From: Mark Salter <msalter at redhat dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Wed, 14 May 2003 11:40:27 -0400 (EDT)
- Subject: RedBoot build problem
I was unable to build RedBoot from a recently checked out tree.
The problem was an undefined reference to rindex which was added
to the dns code recently. Instead of pulling in rindex, which
requires CYGINT_ISO_CTYPE which is implemented in CYGPKG_LIBC_I18N,
can we just use strrchr instead?
--Mark
2003-05-14 Mark Salter <msalter@redhat.com>
* include/dns_impl.inl: Use strrchr instead of rindex.
Index: net/ns/dns/current/include/dns_impl.inl
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/ns/dns/current/include/dns_impl.inl,v
retrieving revision 1.5
diff -u -p -5 -r1.5 dns_impl.inl
--- net/ns/dns/current/include/dns_impl.inl 12 May 2003 10:06:05 -0000 1.5
+++ net/ns/dns/current/include/dns_impl.inl 14 May 2003 15:34:37 -0000
@@ -532,11 +532,11 @@ gethostbyname(const char * hostname)
/* If the hostname ends with . it a FQDN. Don't bother adding the
domainname. If it does not contain a . , try appending with the
domainname first. If it does have a . , try without a domain name
first. */
- dot = rindex(hostname,'.');
+ dot = strrchr(hostname,'.');
if (dot) {
if (*(dot+1) == '\0') {
/* FQDN */
hent = do_query(hostname);
} else {