Applied (but divided to multiple patches). Thanks.

    Karel

On Sun, Nov 04, 2007 at 04:15:36PM +0000, Samuel Thibault wrote:
> diff --git a/configure.ac b/configure.ac
> index 98115cb..3d6944c 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 e7ade26..2849a9d 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 "common.h"
>  #include "fdisk.h"
> diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c
> index 060bbb5..1998832 100644
> --- a/fdisk/fdisksunlabel.c
> +++ b/fdisk/fdisksunlabel.c
> @@ -26,7 +26,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"
> @@ -68,6 +70,9 @@ static inline uint32_t __swap32(uint32_t x) {
>  #define SSWAP32(x) (other_endian ? __swap32(x) \
>                                : (uint32_t)(x))
>  
> +#ifndef FLOPPY_MAJOR
> +#define FLOPPY_MAJOR 2
> +#endif
>  #ifndef IDE0_MAJOR
>  #define IDE0_MAJOR 3
>  #endif
> diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
> index d82ba56..7c9fbbe 100644
> --- a/fdisk/sfdisk.c
> +++ b/fdisk/sfdisk.c
> @@ -46,7 +46,6 @@
>  #include <sys/ioctl.h>
>  #include <sys/stat.h>
>  #include <sys/utsname.h>
> -#include <linux/unistd.h>    /* _syscall */
>  #include "nls.h"
>  #include "common.h"
>  
> diff --git a/login-utils/agetty.c b/login-utils/agetty.c
> index 9c81c0f..7e2eee1 100644
> --- a/login-utils/agetty.c
> +++ b/login-utils/agetty.c
> @@ -40,6 +40,8 @@
>  #include "pathnames.h"
>  #include <sys/param.h>
>  #define USE_SYSLOG
> +#elif !defined(_PATH_LOGIN)
> +#define _PATH_LOGIN "/bin/login"
>  #endif
>  
>   /* If USE_SYSLOG is undefined all diagnostics go directly to /dev/console. 
> */
> diff --git a/login-utils/checktty.c b/login-utils/checktty.c
> index 16f9f2e..ad2e138 100644
> --- a/login-utils/checktty.c
> +++ b/login-utils/checktty.c
> @@ -25,7 +25,9 @@
>  #include "nls.h"
>  
>  #include <sys/sysmacros.h>
> +#ifdef HAVE_LINUX_MAJOR_H
>  #include <linux/major.h>
> +#endif
>  
>  #include "pathnames.h"
>  #include "login.h"
> @@ -118,6 +120,7 @@ add_to_class(struct ttyclass *tc, char *tty)
>  static int
>  isapty(const char *tty)
>  {
> +#ifdef __linux__
>      char devname[100];
>      struct stat stb;
>  
> @@ -148,6 +151,7 @@ isapty(const char *tty)
>  
>      }
>      return 0;
> +#endif
>  }
>  
>  
> diff --git a/misc-utils/script.c b/misc-utils/script.c
> index 3b957d8..9ab38e0 100644
> --- a/misc-utils/script.c
> +++ b/misc-utils/script.c
> @@ -53,6 +53,8 @@
>  #include <sys/file.h>
>  #include <sys/signal.h>
>  #include <errno.h>
> +#include <getopt.h>
> +#include <string.h>
>  #include "nls.h"
>  
>  #ifdef __linux__


-- 
 Karel Zak  <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to