From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9308 Path: news.gmane.org!not-for-mail From: Andre McCurdy Newsgroups: gmane.linux.lib.musl.general Subject: utmpxname() but no prototype? Date: Fri, 12 Feb 2016 00:28:53 -0800 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1455265808 6087 80.91.229.3 (12 Feb 2016 08:30:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Feb 2016 08:30:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9321-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 12 09:30:00 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 1aU971-0006Ge-RT for gllmg-musl@m.gmane.org; Fri, 12 Feb 2016 09:29:59 +0100 Original-Received: (qmail 18214 invoked by uid 550); 12 Feb 2016 08:29:56 -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 17940 invoked from network); 12 Feb 2016 08:29:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tJiSnMvNSUtwD9Aj8WCocize6H0QYfKpksD1DQ30fpY=; b=p4cq2c6CoIkJ/oAn9RA1jKBkD2hEG6UmAarBQSmGH+trlUt300xSYY4HFCtsy6QLYC d6xPeVRflmi8b4icqx6qPu3UQ3Y4FOfe0Mp2z5yBuEZfdlYzbYiGGPnr2UfQbcf3e9pN brGgnlCNq6tOWgTinlrb7KQx26gCbSZfd8Hb9JZOKMMYYnHiHWm+EFUF5ia3XEuyNeeu NvZbu705kig/x3zt0QZtOWisY9r7KkC/d0JkOU4pp3j2Yo/QCXQ44tmqy1j3lYy3G54f VBa9MGjRoXd9BHb6xT2AlasSQAFJoEFmr7Dg6b4KNBFfke240QuxDeqOPhS2GaGiJuUI cKvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=tJiSnMvNSUtwD9Aj8WCocize6H0QYfKpksD1DQ30fpY=; b=YqzYEn6bN73e7hhNJkzMKyGE5unmPUCwxtP9DyAazIXYUTJcjr7SgfMiRC0DDQ1rPr P4jJIAMF6C5i6Fdw+GsLdL/5cD7cethtWHbJcwg3RI/of/CDo8hpRZNrAF5v8j3rhI3X bTftLJ7svXlnQ0u3THuF9nHgJJHxJ3+KDE6StYKIdWyv0jJ8KB+zyccsoOFoNxh4ctoK 51xnlotc69/n7tJq2mRXl3JBgA/f8AbmdOlQP8Nd9annFRrh0muWc7PFXA8eBye4Rcbl ENbI+Xu+m9Bfu/jQFCRXUVV+kfkytyF+aRrug+702yOHl8IAu1K4NiND15uph4Vu81NY vUMw== X-Gm-Message-State: AG10YOT6tqRM3kM7EAT0OMwxCl+lpUUYi5VcB+01rMW3STwOiIs7aSvl1OQv4fmcWB4N4rL/cT9+0bkps6Nl9w== X-Received: by 10.28.103.197 with SMTP id b188mr1543974wmc.4.1455265733421; Fri, 12 Feb 2016 00:28:53 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:9308 Archived-At: 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) ? Thanks Andre --