mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: musl@lists.openwall.com
Subject: utmpxname() but no prototype?
Date: Fri, 12 Feb 2016 00:28:53 -0800	[thread overview]
Message-ID: <CAJ86T=VCkUySiJ=DkswqFp14THN8CTE+9DdybPP4=Hi_quFb5w@mail.gmail.com> (raw)

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
--


             reply	other threads:[~2016-02-12  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12  8:28 Andre McCurdy [this message]
2016-02-12 14:56 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ86T=VCkUySiJ=DkswqFp14THN8CTE+9DdybPP4=Hi_quFb5w@mail.gmail.com' \
    --to=armccurdy@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).