* utmpxname() but no prototype?
@ 2016-02-12 8:28 Andre McCurdy
2016-02-12 14:56 ` Rich Felker
0 siblings, 1 reply; 2+ messages in thread
From: Andre McCurdy @ 2016-02-12 8:28 UTC (permalink / raw)
To: musl
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
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: utmpxname() but no prototype?
2016-02-12 8:28 utmpxname() but no prototype? Andre McCurdy
@ 2016-02-12 14:56 ` Rich Felker
0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2016-02-12 14:56 UTC (permalink / raw)
To: musl
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-12 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 8:28 utmpxname() but no prototype? Andre McCurdy
2016-02-12 14:56 ` Rich Felker
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).