summaryrefslogtreecommitdiff
path: root/login/getutmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'login/getutmp.c')
-rw-r--r--login/getutmp.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/login/getutmp.c b/login/getutmp.c
index 481150d5ef..bc991457e5 100644
--- a/login/getutmp.c
+++ b/login/getutmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <string.h>
#include <utmp.h>
@@ -23,23 +23,11 @@
void
getutmp (const struct utmpx *utmpx, struct utmp *utmp)
{
-#if _HAVE_UT_TYPE - 0
utmp->ut_type = utmpx->ut_type;
-#endif
-#if _HAVE_UT_PID - 0
utmp->ut_pid = utmpx->ut_pid;
-#endif
memcpy (utmp->ut_line, utmpx->ut_line, sizeof (utmp->ut_line));
memcpy (utmp->ut_user, utmpx->ut_user, sizeof (utmp->ut_user));
-#if _HAVE_UT_ID - 0
memcpy (utmp->ut_id, utmpx->ut_id, sizeof (utmp->ut_id));
-#endif
-#if _HAVE_UT_HOST - 0
memcpy (utmp->ut_host, utmpx->ut_host, sizeof (utmp->ut_host));
-#endif
-#if _HAVE_UT_TV - 0
utmp->ut_tv = utmpx->ut_tv;
-#else
- utmp->ut_time = utmpx->ut_time;
-#endif
}