From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2521 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: lshw FTBFS: res_querydomain declared but not implemented Date: Mon, 31 Dec 2012 13:06:53 -0500 Message-ID: <20121231180653.GO20323@brightrain.aerifal.cx> References: <20121230215931.cf9ff1d0.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1356977225 32681 80.91.229.3 (31 Dec 2012 18:07:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Dec 2012 18:07:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2522-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 31 19:07:21 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 1Tpjlg-0005RH-Lt for gllmg-musl@plane.gmane.org; Mon, 31 Dec 2012 19:07:20 +0100 Original-Received: (qmail 10105 invoked by uid 550); 31 Dec 2012 18:07:05 -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 10097 invoked from network); 31 Dec 2012 18:07:05 -0000 Content-Disposition: inline In-Reply-To: <20121230215931.cf9ff1d0.idunham@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2521 Archived-At: 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? > 1: lshw uses __uint8_t (standard fixes work) Indeed, this is just a bug in the app. > 2: It wants GNU basename() (I added and used -fpermissive) I'm not sure how that would help. If it wants GNU semantics, it should probably use a drop-in replacement for the function. > 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... > 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... > 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."? > -it doesn't handle domain == NULL (should use name, without any terminal ".") Seems easy enough to fix.. > -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. Rich