File util-linux-agetty-smart-reload-10.patch of Package python-libmount.12081
Refresh.
From d7a412fe0ae5fa08b891769be2961e5d80769484 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon, 12 Nov 2018 11:31:17 +0100
Subject: [PATCH 10/14] agetty: fix portability issues
Signed-off-by: Karel Zak <kzak@redhat.com>
---
term-utils/agetty.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: util-linux-2.31.1/term-utils/agetty.c
===================================================================
--- util-linux-2.31.1.orig/term-utils/agetty.c
+++ util-linux-2.31.1/term-utils/agetty.c
@@ -1688,6 +1688,7 @@ static int wait_for_term_input(int fd)
}
#endif /* AGETTY_RELOAD */
#ifdef ISSUE
+#ifdef AGETTY_RELOAD
static int issue_is_changed(struct issue *ie)
{
if (ie->mem_old && ie->mem
@@ -1780,6 +1781,7 @@ static void eval_issue_file(struct issue
fclose(ie->output);
#endif /* ISSUE */
}
+#endif
/* Show login prompt, optionally preceded by /etc/issue contents. */
static void do_prompt(struct issue *ie, struct options *op, struct termios *tp)
@@ -1924,8 +1926,8 @@ static char *get_logname(struct issue *i
/* Write issue file and prompt */
do_prompt(ie, op, tp);
-#ifdef AGETTY_RELOAD
no_reload:
+#ifdef AGETTY_RELOAD
if (!wait_for_term_input(STDIN_FILENO)) {
/* refresh prompt -- discard input data, clear terminal
* and call do_prompt() again
@@ -2577,6 +2579,7 @@ static void output_special_char(struct i
fprintf (ie->output, "%d ", users);
break;
}
+#if defined(RTMGRP_IPV4_IFADDR) && defined(RTMGRP_IPV6_IFADDR)
case '4':
case '6':
{
@@ -2596,6 +2599,7 @@ static void output_special_char(struct i
freeifaddrs(addrs);
break;
}
+#endif
default:
putchar(c);
break;