From 1f53c33a7c38101311e61c5a787fc6be0215798f Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 14 Apr 1999 16:00:33 +0000 Subject: [PATCH] update_wtmp.c: Don't use updwtmpx() even if it exists for glibc 2.1, since it's the same as updwtmp(), and glibc doesn't define PATH_WTMPX. updwtmpx() is not part of the XPG standard anyway. (Needed for RedHat 6.0.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11357 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 7 +++++++ src/util/pty/update_wtmp.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index a910a15d1..b6a34041d 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,10 @@ +1999-04-14 + + * update_wtmp.c: Don't use updwtmpx() even if it exists for glibc + 2.1, since it's the same as updwtmp(), and glibc doesn't + define PATH_WTMPX. updwtmpx() is not part of the XPG + standard anyway. (Needed for RedHat 6.0.) + Sun Mar 28 17:50:57 1999 Tom Yu * update_wtmp.c: Define WTMPX_FILE to be _PATH_WTMPX in case we're diff --git a/src/util/pty/update_wtmp.c b/src/util/pty/update_wtmp.c index b65b87092..9d3af2128 100644 --- a/src/util/pty/update_wtmp.c +++ b/src/util/pty/update_wtmp.c @@ -34,6 +34,13 @@ #define WTMP_FILE "/usr/adm/wtmp" #endif +#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) +/* This is ugly, but the lack of standardization in the utmp/utmpx + * space, and what glibc implements and doesn't make available, is + * even worse. + */ +#undef HAVE_UPDWTMPX /* Don't use updwtmpx for glibc 2.1 */ +#endif long ptyint_update_wtmp (ent , host, user) struct utmp *ent; -- 2.26.2