2002-08-02 04:11:19

by Adam J. Richter

[permalink] [raw]
Subject: Patch: linux-2.5.30: return hd_driveid to <linux/hdreg.h>

IDE-108 moved struct hd_driveid from linux/hdreg.h to
linux/ide.h. However, user level code in pcmcia-cs-3.2.0/cardmgr/ide-info.c
refers to hd_driveid, and including <linux/ide.h> results in a flood
of conflicts with GNU C library headers.

The following patch returns struct hd_driveid to include/linux/hdreg.h
and changes its u{8,16,32,64} references to __u{8,16,32,64} (which are
types that the linux include files export for user level programs).

I have rebuilt the core kernel, drivers/{ide,scsi} and
pcmcia-cs-3.2.0 with this change. It fixes the pcmcia-cs-3.2.0
compilation problems and does not appear to cause any new compilation
errors in the kernel.

--
Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."


Attachments:
(No filename) (935.00 B)
ide.diffs (15.65 kB)
Download all attachments

2002-08-02 09:50:15

by Marcin Dalecki

[permalink] [raw]
Subject: Re: Patch: linux-2.5.30: return hd_driveid to <linux/hdreg.h>

U?ytkownik Adam J. Richter napisa?:
> IDE-108 moved struct hd_driveid from linux/hdreg.h to
> linux/ide.h. However, user level code in pcmcia-cs-3.2.0/cardmgr/ide-info.c
> refers to hd_driveid, and including <linux/ide.h> results in a flood
> of conflicts with GNU C library headers.
>
> The following patch returns struct hd_driveid to include/linux/hdreg.h
> and changes its u{8,16,32,64} references to __u{8,16,32,64} (which are
> types that the linux include files export for user level programs).
>
> I have rebuilt the core kernel, drivers/{ide,scsi} and
> pcmcia-cs-3.2.0 with this change. It fixes the pcmcia-cs-3.2.0
> compilation problems and does not appear to cause any new compilation
> errors in the kernel.

Please don't. This structure is not a property of the Linux kernel.
This struture is something which should simply be redeclared in
pcmcia-cs and handled there. It is a "bug" on behalf of pcmcia-cs to
rely on the fact that accidentally some random kernel header
is daclaring it as well.