summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--fdisk/fdisksgilabel.c1
-rw-r--r--fdisk/fdisksunlabel.c5
-rw-r--r--login-utils/checktty.c8
4 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ed12e60b..8a1d96d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
AC_SYS_LARGEFILE
-AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h], [], [], [
+AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
#ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
#endif
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c
index 5adf64e3..c970c7cf 100644
--- a/fdisk/fdisksgilabel.c
+++ b/fdisk/fdisksgilabel.c
@@ -22,7 +22,6 @@
#include <endian.h>
#include "nls.h"
-#include <linux/major.h> /* FLOPPY_MAJOR */
#include "blkdev.h"
diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c
index ff9a182d..4ed97330 100644
--- a/fdisk/fdisksunlabel.c
+++ b/fdisk/fdisksunlabel.c
@@ -27,7 +27,9 @@
#include <scsi/scsi.h> /* SCSI_IOCTL_GET_IDLUN */
#undef u_char
#endif
+#ifdef HAVE_LINUX_MAJOR_H
#include <linux/major.h> /* FLOPPY_MAJOR */
+#endif
#include "common.h"
#include "fdisk.h"
@@ -69,6 +71,9 @@ static inline __u32 __swap32(__u32 x) {
#define SSWAP32(x) (other_endian ? __swap32(x) \
: (__u32)(x))
+#ifndef FLOPPY_MAJOR
+#define FLOPPY_MAJOR 2
+#endif
#ifndef IDE0_MAJOR
#define IDE0_MAJOR 3
#endif
diff --git a/login-utils/checktty.c b/login-utils/checktty.c
index 16f9f2e8..c28ee833 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;
}