Re: util-linux-ng-2.17 and kernel header 2.6.32.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Thanks for your report (CC to util-linux-ng maililng list).

On Wed, Jan 13, 2010 at 10:07:18AM +0100, Thomas Stalder wrote:
> When I try to compile util-linux-ng-2.17 with kernel header 2.6.32.3 I  

 $ rpm -qf /usr/include/scsi/scsi.h
 glibc-headers-2.11.90-1.x86_64

> have this warning in the configure script:
> configure: WARNING: scsi/scsi.h: present but cannot be compiled
> configure: WARNING: scsi/scsi.h:     check for missing prerequisite headers?
> configure: WARNING: scsi/scsi.h: see the Autoconf documentation
> configure: WARNING: scsi/scsi.h:     section "Present But Cannot Be  
> Compiled"
> configure: WARNING: scsi/scsi.h: proceeding with the preprocessor's result
> configure: WARNING: scsi/scsi.h: in the future, the compiler will take  
> precedence
> configure: WARNING:     ## ------------------------------ ##
> configure: WARNING:     ## Report this to kzak@xxxxxxxxxx ##
> configure: WARNING:     ## ------------------------------ ##
>
> and this error when I try to make the application :
>
> In file included from fdisksunlabel.c:27:
> /usr/include/scsi/scsi.h:148: error: expected specifier-qualifier-list  
> before 'u8'

 It seems your scsi.h includes kernel junk that does not belong to userspace.

> /usr/include/scsi/scsi.h: In function 'scsi_varlen_cdb_length':
> /usr/include/scsi/scsi.h:159: error: 'struct scsi_varlen_cdb_hdr' has no  
> member named 'additional_cdb_length'
> make[2]: *** [fdisk-fdisksunlabel.o] Error 1

 Anyway, the #include scsi.h in fdisk/fdisksunlabel.c is unnecessary
 legacy. Fixed.

    Karel


>From 2c4b9254e911d18196c7bec8b4c84c2e65b552ea Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@xxxxxxxxxx>
Date: Wed, 13 Jan 2010 10:51:57 +0100
Subject: [PATCH] fdisk: don't include scsi.h

The fdisksunlabel.c header file is unnecessary for fdisk/fdisksunlabel.h.

Reported-by: Thomas Stalder <thomas@xxxxxxxxxxx>
Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>
---
 configure.ac          |    1 -
 fdisk/fdisksunlabel.c |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index e775062..5ddeaa5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,7 +116,6 @@ AC_CHECK_HEADERS(
 	net/if_dl.h \
         netinet/in.h \
 	rpcsvc/nfs_prot.h \
-	scsi/scsi.h \
 	stdlib.h \
 	sys/disk.h \
 	sys/disklabel.h \
diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c
index 2f9fad9..670a15a 100644
--- a/fdisk/fdisksunlabel.c
+++ b/fdisk/fdisksunlabel.c
@@ -22,11 +22,6 @@
 #include "blkdev.h"
 
 #include <endian.h>
-#ifdef HAVE_SCSI_SCSI_H
-#define u_char	unsigned char
-#include <scsi/scsi.h>		/* SCSI_IOCTL_GET_IDLUN */
-#undef u_char
-#endif
 #ifdef HAVE_LINUX_MAJOR_H
 #include <linux/major.h>	/* FLOPPY_MAJOR */
 #endif
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux