diff options
author | Aurelien Jarno <aurel32@debian.org> | 2009-05-29 03:28:45 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2009-05-29 03:28:45 -0600 |
commit | d0efa51f2664377305f8004a8828a881643bf47e (patch) | |
tree | 04d888c5d8be52229ac0c3d0eb046c36973c7024 | |
parent | 555f95bb9561c4fe0e59cbac4587f615f337f83b (diff) | |
download | util-linux-old-d0efa51f2664377305f8004a8828a881643bf47e.tar.gz |
remaining kFreeBSD hackery for building.
Addresses-Debian-Bug: #527384
Signed-off-by: LaMont Jones <lamont@debian.org>
-rw-r--r-- | login-utils/Makefile.am | 1 | ||||
-rw-r--r-- | login-utils/agetty.c | 15 | ||||
-rw-r--r-- | sys-utils/ipcs.c | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am index 5ed581b8..0386cee4 100644 --- a/login-utils/Makefile.am +++ b/login-utils/Makefile.am @@ -11,6 +11,7 @@ EXTRA_DIST = README.getty README.modems-with-agetty README.poeigl if BUILD_AGETTY sbin_PROGRAMS += agetty dist_man_MANS += agetty.8 +agetty_LDADD = -lutil endif if BUILD_INIT diff --git a/login-utils/agetty.c b/login-utils/agetty.c index 90a64b33..817ec05f 100644 --- a/login-utils/agetty.c +++ b/login-utils/agetty.c @@ -37,7 +37,11 @@ #include "nls.h" #include "pathnames.h" -#ifdef __linux__ +#if defined(__FreeBSD_kernel__) +#include <pty.h> +#endif + +#if defined(__linux__) || defined(__FreeBSD_kernel__) #include <sys/param.h> #define USE_SYSLOG #endif @@ -281,7 +285,7 @@ main(argc, argv) parse_args(argc, argv, &options); -#ifdef __linux__ +#if defined (__linux__) || defined(__FreeBSD_kernel__) setsid(); #endif @@ -670,6 +674,13 @@ open_tty(tty, tp, local) if (tcgetattr(0, tp) < 0) error("%s: tcgetattr: %m", tty); + /* + * login_tty: steal tty from other process group. + */ +#if defined(__FreeBSD_kernel__) + login_tty (0); +#endif + /* * It seems to be a terminal. Set proper protections and ownership. Mode * 0622 is suitable for SYSV <4 because /bin/login does not change diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 55d5c80f..1567f9a6 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -499,8 +499,10 @@ void do_msg (char format) case STATUS: printf (_("------ Messages: Status --------\n")); +#ifndef __FreeBSD_kernel__ printf (_("allocated queues = %d\n"), msginfo.msgpool); printf (_("used headers = %d\n"), msginfo.msgmap); +#endif printf (_("used space = %d bytes\n"), msginfo.msgtql); return; |