diff options
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/checktty.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/login-utils/checktty.c b/login-utils/checktty.c index 16f9f2e88..c28ee833d 100644 --- a/login-utils/checktty.c +++ b/login-utils/checktty.c @@ -25,12 +25,18 @@ #include "nls.h" #include <sys/sysmacros.h> +#ifdef HAVE_LINUX_MAJOR_H #include <linux/major.h> +#endif #include "pathnames.h" #include "login.h" #include "xstrncpy.h" +#ifndef TTY_MAJOR +#define TTY_MAJOR 4 +#endif + static gid_t mygroups[NGROUPS]; static int num_groups; @@ -118,6 +124,7 @@ add_to_class(struct ttyclass *tc, char *tty) static int isapty(const char *tty) { +#ifdef __linux__ char devname[100]; struct stat stb; @@ -147,6 +154,7 @@ isapty(const char *tty) #endif } +#endif /* __linux__ */ return 0; } |