From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2523 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: lshw FTBFS: res_querydomain declared but not implemented Date: Mon, 31 Dec 2012 12:03:34 -0800 Message-ID: <20121231120334.05263f66.idunham@lavabit.com> References: <20121230215931.cf9ff1d0.idunham@lavabit.com> <20121231180653.GO20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1356984227 21374 80.91.229.3 (31 Dec 2012 20:03:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Dec 2012 20:03:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2524-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 31 21:04:03 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tplad-0006rB-Ht for gllmg-musl@plane.gmane.org; Mon, 31 Dec 2012 21:04:03 +0100 Original-Received: (qmail 17873 invoked by uid 550); 31 Dec 2012 20:03:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17865 invoked from network); 31 Dec 2012 20:03:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=UlgyEr49Hwphr7ORHZ0WsvM+8Q8oECdGwDZKZhF91nDnibVZZGDvopYcnaQOYlDLy+PHf2kLctWQRNcgsMVp9ldG3XyINj98pb45bqLVXlkRPqFWyEF649GXa9+ga8OT1QaQ2qztQFrwAKS8M0Rsf8GdgtB6MMRE6XNBw2qqU2I=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20121231180653.GO20323@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2523 Archived-At: On Mon, 31 Dec 2012 13:06:53 -0500 Rich Felker wrote: > On Sun, Dec 30, 2012 at 09:59:31PM -0800, Isaac Dunham wrote: > > I've been trying to build lshw [1] with musl, and I ran into a few problems: > > Have you sent any reports/patches upstream yet? I figured I'd get it to compile and see how it runs first. > > 3: It wants MAX_PATH from some header that doesn't have it: I added > > PATH_MAX is in limits.h. MAXPATHLEN is in sys/param.h (bogus header > full of random miscellaneous junk). I don't think I've ever heard of > MAX_PATH... Sorry, I meant PATH_MAX. > > 4: It wants res_querydomain. > > This does not show up until link time, since declares it. > > However, musl does not acually implement this function. > > And it seems to be completely undocumented how it's supposed to > work... Call res_query with name as "name.domain". It's described in the linux-dev manpages. > > Currently, I've got a very hackish implementation that isn't fit to ship: > > -it doesn't check for name == "machine." > > What is special about "machine."? That was a bad example; I meant "Doesn't check for a terminal '.'" > > -it does no error checking, on the assumption that res_query can handle that. > > Seems fine. > > BTW a full name can never be longer than 256 bytes (including null > termination), so you can do the concatenation on the stack in a > fixed-size array. You'll need to generate your own error if the > combined length would exceed the max. Ah, thanks. -- Isaac Dunham