lib/utmp.c: Merge preprocessor conditionals
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org> Cherry-picked-from:e5815acf37("lib/utmp.c: Merge preprocessor conditionals") [alx: This is needed by1af6b68cbe("lib/utmp.c: Use the appropriate autotools macros for struct utmpx")] Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
+2
-4
@@ -189,12 +189,11 @@ get_session_host(char **out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef USE_PAM
|
#if !defined(USE_PAM) && !defined(HAVE_UPDWTMPX)
|
||||||
/*
|
/*
|
||||||
* Some systems already have updwtmpx(). Others
|
* Some systems already have updwtmpx(). Others
|
||||||
* don't, so we re-implement these functions if necessary.
|
* don't, so we re-implement these functions if necessary.
|
||||||
*/
|
*/
|
||||||
# ifndef HAVE_UPDWTMPX
|
|
||||||
static void
|
static void
|
||||||
updwtmpx(const char *filename, const struct utmpx *ut)
|
updwtmpx(const char *filename, const struct utmpx *ut)
|
||||||
{
|
{
|
||||||
@@ -206,8 +205,7 @@ updwtmpx(const char *filename, const struct utmpx *ut)
|
|||||||
close (fd);
|
close (fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif /* ! HAVE_UPDWTMPX */
|
#endif
|
||||||
#endif /* ! USE_PAM */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user