Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
+#if HAVE_MNTENT_H
#include <mntent.h>
+#endif
#include <string.h>
#include <sys/stat.h>
#include <ctype.h>
#include <sys/param.h>
+#ifdef __APPLE__
+#include <sys/ucred.h>
+#include <sys/mount.h>
+#endif
#include "pathnames.h"
#include "ismounted.h"
#include "nls.h"
-#ifdef HAVE_LIBUTIL
+#if HAVE_LIBUTIL && HAVE_PTY_H
#include <pty.h>
#endif
struct winsize win;
int lb;
int l;
-#ifndef HAVE_LIBUTIL
+#if !HAVE_LIBUTIL || !HAVE_PTY_H
char line[] = "/dev/ptyXX";
#endif
int aflg = 0;
void
getmaster() {
-#ifdef HAVE_LIBUTIL
+#if HAVE_LIBUTIL && HAVE_PTY_H
(void) tcgetattr(0, &tt);
(void) ioctl(0, TIOCGWINSZ, (char *)&win);
if (openpty(&master, &slave, NULL, &tt, &win) < 0) {