Re: [PATCH 11/11] agetty: re-add utmp.h for Debian GNU/kFreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 01 December 2016, Ruediger Meier wrote:
> From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
>
> It's needed there to get login_tty(). On normal FreeBSD we would
> need libutil.h.
>
> Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx>
> ---
>  configure.ac        | 2 ++
>  term-utils/agetty.c | 8 +++++++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index afb255e..e9901bc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -208,6 +208,7 @@ AC_CHECK_HEADERS([ \
>  	getopt.h \
>  	inttypes.h \
>  	lastlog.h \
> +	libutil.h \
>  	linux/btrfs.h \
>  	linux/cdrom.h \
>  	linux/falloc.h \
> @@ -257,6 +258,7 @@ AC_CHECK_HEADERS([ \
>  	sys/un.h \
>  	unistd.h \
>  	shadow.h \
> +	utmp.h \
>  	utmpx.h \
>  ])
>
> diff --git a/term-utils/agetty.c b/term-utils/agetty.c
> index 46eea01..95236ce 100644
> --- a/term-utils/agetty.c
> +++ b/term-utils/agetty.c
> @@ -55,7 +55,13 @@
>  #endif
>
>  #if defined(__FreeBSD_kernel__)
> -#include <pty.h>
> +# include <pty.h>

BTW I think that pty.h is not needed here at all. It was added in
c32270d4 for login_tty() probably because in "man login_tty" it's hard 
to see that you only need utmp.h. There is no pty.h on non-GNU FreeBSD.

> +# ifdef HAVE_UTMPX_H
> +#  include <utmp.h>
> +# endif
> +# ifdef HAVE_LIBUTIL_H
> +#  include <libutil.h>
> +# endif
>  #endif
>
>  #ifdef __linux__


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux