From: Alejandro Colomar Date: Tue, 20 Feb 2024 18:09:36 +0000 (+0100) Subject: lib/utmp.c: Merge preprocessor conditionals X-Git-Tag: 4.14.6~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=561cbbe880a7753c1908d4d87f6482723e95dc37;p=thirdparty%2Fshadow.git lib/utmp.c: Merge preprocessor conditionals Reviewed-by: Iker Pedrosa Signed-off-by: Alejandro Colomar Cherry-picked-from: e5815acf371f ("lib/utmp.c: Merge preprocessor conditionals") [alx: This is needed by 1af6b68cbeb9 ("lib/utmp.c: Use the appropriate autotools macros for struct utmpx")] Signed-off-by: Alejandro Colomar --- diff --git a/lib/utmp.c b/lib/utmp.c index ab2ee7ba8..dc9e2b7f2 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -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 * don't, so we re-implement these functions if necessary. */ -# ifndef HAVE_UPDWTMPX static void updwtmpx(const char *filename, const struct utmpx *ut) { @@ -206,8 +205,7 @@ updwtmpx(const char *filename, const struct utmpx *ut) close (fd); } } -# endif /* ! HAVE_UPDWTMPX */ -#endif /* ! USE_PAM */ +#endif /*