From 2a473de4158867cc91d985ac11e8a99d1d52f9ef Mon Sep 17 00:00:00 2001 From: Eric Cronin Date: Mon, 24 Mar 2008 12:33:04 -0700 Subject: [PATCH] Missing HAVE_UPDWTMPX check before using updwtmpx(). In 10.5 Mac OS X added enough utmpx support to make it past the first two preprocessor checks around line 390 of src/smbd/utmp.c and on to the utmpx block which uses updwtmpx(). Unfortunately, as ./configure correctly surmised, 10.5 doesn't have that. https://bugzilla.samba.org/show_bug.cgi?id=5184 (cherry picked from commit f19d1e3d93d0d9dfe80372c6c5635f1047f9aa88) --- source/smbd/utmp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/smbd/utmp.c b/source/smbd/utmp.c index 5931b2b1d06..de6d707eafd 100644 --- a/source/smbd/utmp.c +++ b/source/smbd/utmp.c @@ -409,6 +409,10 @@ static void sys_utmp_update(struct utmp *u, const char *hostname, bool claim) /* Odd. Have utmpx.h but no "getutmpx()". Drop to non-x stuff */ DEBUG(1,("utmp_update: have utmpx.h but no getutmpx() function\n")); utmp_nox_update(u, claim); +#elif !defined(HAVE_UPDWTMPX) + /* Have utmpx.h but no "updwtmpx()". Drop to non-x stuff */ + DEBUG(1,("utmp_update: have utmpx.h but no updwtmpx() function\n")); + utmp_nox_update(u, claim); #else char *uname = NULL; char *wname = NULL; -- 2.11.4.GIT