* [Bug 216168] New: updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx
@ 2022-06-24 2:42 bugzilla-daemon
2022-06-24 2:45 ` [Bug 216168] " bugzilla-daemon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-06-24 2:42 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216168
Bug ID: 216168
Summary: updwtmp(3) doesn't mention need for _GNU_SOURCE for
updwtmpx
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
Assignee: documentation_man-pages@kernel-bugs.osdl.org
Reporter: sam@gentoo.org
Regression: No
I think utmpxh's updwtmpx might need _GNU_SOURCE to be defined to be usable?
Noticed when investigating a warning when building gdm 42.0:
```
../gdm-42.0/daemon/gdm-session-record.c:200:9: error: implicit declaration of
function ‘updwtmpx’; did you mean ‘updwtmp’?
[-Werror=implicit-function-declaration]
updwtmpx (GDM_NEW_SESSION_RECORDS_FILE, &session_record);
```
... but:
```
#if defined(HAVE_UTMPX_H)
#include <utmpx.h>
#endif
#if defined(HAVE_UTMP_H)
#include <utmp.h>
#endif
```
And config.h, set by Meson, contains HAVE_UTMPX_H, HAVE_UTMP_H, HAVE_UPDWTMP,
HAVE_UPDWTMPX.
From looking at glibc-2.35's /usr/include/utmpx.h, I think it might need
_GNU_SOURCE? It's guarded by __USE_GNU within glibc headers:
```
[..]
#ifdef __USE_GNU
/* Change name of the utmpx file to be examined.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int utmpxname (const char *__file);
[...]
/* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern void updwtmpx (const char *__wtmpx_file,
const struct utmpx *__utmpx);
[...]
```
Aside: a friend points out that NetBSD needs NETBSD_SOURCE defined for it too:
https://github.com/NetBSD/src/blob/6c9d506c6146a69f3807ce59b4c063792ef32829/include/utmpx.h#L143.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 216168] updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx
2022-06-24 2:42 [Bug 216168] New: updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx bugzilla-daemon
@ 2022-06-24 2:45 ` bugzilla-daemon
2022-06-24 5:09 ` bugzilla-daemon
2022-07-03 18:27 ` bugzilla-daemon
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-06-24 2:45 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216168
--- Comment #1 from Sam James (sam@gentoo.org) ---
FWIW, Gnulib indeed (as the man page hints) that it is a glibc extension:
https://www.gnu.org/software/gnulib/manual/gnulib.html#updwtmpx.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 216168] updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx
2022-06-24 2:42 [Bug 216168] New: updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx bugzilla-daemon
2022-06-24 2:45 ` [Bug 216168] " bugzilla-daemon
@ 2022-06-24 5:09 ` bugzilla-daemon
2022-07-03 18:27 ` bugzilla-daemon
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-06-24 5:09 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216168
--- Comment #2 from Sam James (sam@gentoo.org) ---
Sent patch to ML: https://marc.info/?l=linux-man&m=165603977710424&w=2.
Suppose the commit message should be more detailed but I'll wait for someone to
tell me if this is even right first :)
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 216168] updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx
2022-06-24 2:42 [Bug 216168] New: updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx bugzilla-daemon
2022-06-24 2:45 ` [Bug 216168] " bugzilla-daemon
2022-06-24 5:09 ` bugzilla-daemon
@ 2022-07-03 18:27 ` bugzilla-daemon
2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2022-07-03 18:27 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=216168
Alejandro Colomar (man-pages) (alx.manpages@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |alx.manpages@gmail.com
Resolution|--- |DOCUMENTED
--- Comment #3 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
Hi Sam,
Sorry for the delay; I read your posts, but didn't have much time to reply.
Yes, normally I'd ask for a more detailed commit message, but since it is very
obvious to me that it's correct from this bugzilla report (and also from the
glibc code), and there's a link to this issue in the commit, I think it's OK as
is the patch.
Thanks!
Alex
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-03 18:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-24 2:42 [Bug 216168] New: updwtmp(3) doesn't mention need for _GNU_SOURCE for updwtmpx bugzilla-daemon
2022-06-24 2:45 ` [Bug 216168] " bugzilla-daemon
2022-06-24 5:09 ` bugzilla-daemon
2022-07-03 18:27 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox