diff -Nru multitail-6.4.2/debian/changelog multitail-6.4.2/debian/changelog --- multitail-6.4.2/debian/changelog 2017-05-27 10:40:02.000000000 +0200 +++ multitail-6.4.2/debian/changelog 2018-02-23 19:24:18.000000000 +0100 @@ -1,3 +1,9 @@ +multitail (6.4.2-3ubuntu1) bionic; urgency=medium + + * Add adapt_to_new_ttyname_behaviour.diff (LP: #1669578) + + -- José Manuel Santamaría Lema Fri, 23 Feb 2018 19:24:18 +0100 + multitail (6.4.2-3) unstable; urgency=medium * upload to unstable diff -Nru multitail-6.4.2/debian/patches/adapt_to_new_ttyname_behaviour.diff multitail-6.4.2/debian/patches/adapt_to_new_ttyname_behaviour.diff --- multitail-6.4.2/debian/patches/adapt_to_new_ttyname_behaviour.diff 1970-01-01 01:00:00.000000000 +0100 +++ multitail-6.4.2/debian/patches/adapt_to_new_ttyname_behaviour.diff 2018-02-23 19:24:18.000000000 +0100 @@ -0,0 +1,25 @@ +Author: José Manuel Santamaría Lema +Description: This is a fix for LP: + According to the ttyname(3) manpage ttyname() return ENODEV if: + "File descriptor refers to a slave pseudoterminal device but the corresponding + pathname could not be found". + This seems to be the case when executing multitail inside LXD containers; + without this patch it would fail with this message: + + The following problem occured: + ----------------------------- + ttyname(0) failed. + If this is a bug, please report the following information: + The last system call returned: 19 which means "No such device" + +--- a/mt.c ++++ b/mt.c +@@ -2707,6 +2707,8 @@ void check_for_valid_stdin() + { + if (errno == ENOTTY || errno == EINVAL) + error_exit(TRUE, FALSE, "Please use -j/-J when you want to pipe something into MultiTail.\n"); ++ else if (errno == ENODEV) ++ return; + else + error_exit(TRUE, FALSE, "ttyname(0) failed.\n"); + } diff -Nru multitail-6.4.2/debian/patches/series multitail-6.4.2/debian/patches/series --- multitail-6.4.2/debian/patches/series 2017-02-01 21:38:20.000000000 +0100 +++ multitail-6.4.2/debian/patches/series 2018-02-23 19:24:18.000000000 +0100 @@ -1,3 +1,4 @@ 01_makefile_fixes.diff 03_manpage_lowercase.diff 04_remove_custom_CFLAGS.diff +adapt_to_new_ttyname_behaviour.diff