From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9309 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: utmpxname() but no prototype? Date: Fri, 12 Feb 2016 09:56:13 -0500 Message-ID: <20160212145613.GQ9349@brightrain.aerifal.cx> References: 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 1455289001 27733 80.91.229.3 (12 Feb 2016 14:56:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Feb 2016 14:56:41 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9322-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 12 15:56:36 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aUF97-0005KX-Ot for gllmg-musl@m.gmane.org; Fri, 12 Feb 2016 15:56:33 +0100 Original-Received: (qmail 17890 invoked by uid 550); 12 Feb 2016 14:56:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17859 invoked from network); 12 Feb 2016 14:56:27 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9309 Archived-At: On Fri, Feb 12, 2016 at 12:28:53AM -0800, Andre McCurdy wrote: > Hi all, > > The lxc configure script uses AC_CHECK_FUNCS to test for utmpxname() > support. From the comments it looks like this check was added > specifically for compatibility with musl: > > https://github.com/lxc/lxc/commit/8b6d8b712b867ab352598ed4b73e80e54a8c915a > > Up until recently, this worked as expected: the configure script > correctly detected that musl did not provide utmpxname(). > > However, recently musl has gained a utmpxname() stub: > > http://git.musl-libc.org/cgit/musl/commit/?id=378f8cb5222b63e4f8532c757ce54e4074567e1f > > but without also gaining a corresponding prototype in utmpx.h. > > This causes a new problem when building lxc: the configure script now > detects that utmpxname() is provided but the build then fails because > there's no prototype for it: > > | ../../../lxc-1.0.7/src/lxc/lxcutmp.c: In function 'utmp_get_runlevel': > | ../../../lxc-1.0.7/src/lxc/lxcutmp.c:256:30: error: implicit > declaration of function 'utmpxname' > [-Werror=implicit-function-declaration] > | if (!access(path, F_OK) && !utmpxname(path)) > | ^ > > Passing "ac_cv_func_utmpxname=no" to the lxc configure script is a > workaround but I'm wondering what the real solution should be. Should > utmpx.h be providing: > > #define utmpxname(x) (-1) > > in the same way that utmp.h provides: > > #define utmpname(x) (-1) > > ? No, there should be a prototype for it (under the appropriate feature test conditions); this is simply an oversight. I'll add it. Thanks for the report. Rich