Here is a patch that should make it possible to compile that file on your system (and on RedHat 6.2).
As you may notice I use HAVE_CDROM_TIMEOUT without the corresponding autoconf check. There reason is that i am not sure what should be done about cdrom_generic_command.timeout. We could: * have a configure check and ifdef-out this whole section of code if timeout is missing * have a configure check and just ifdef-out that line as I have done. Would the request work if timeout is set to 0 (via memset) * poke the value at a hard-coded offset in the structure * duplicate the structure definition under another name and use that
It seems that on your system CDROM_SEND_PACKET is not defined, though it is defined on RedHat 6.2. So in your case my patch just disables everything.
Does anyone have suggestions?
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ I haven't lost my mind, it's backed up on tape around here somewhere...
Index: dlls/ntdll/cdrom.c =================================================================== RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v retrieving revision 1.9 diff -u -r1.9 cdrom.c --- dlls/ntdll/cdrom.c 1 May 2002 22:25:42 -0000 1.9 +++ dlls/ntdll/cdrom.c 6 May 2002 20:05:34 -0000 @@ -102,8 +102,12 @@ case IDE3_MAJOR: *iface = 3; break; case IDE4_MAJOR: *iface = 4; break; case IDE5_MAJOR: *iface = 5; break; +#ifdef IDE6_MAJOR case IDE6_MAJOR: *iface = 6; break; +#endif +#ifdef IDE7_MAJOR case IDE7_MAJOR: *iface = 7; break; +#endif default: FIXME("major %d not supported\n", major(st.st_rdev)); } @@ -1027,6 +1031,18 @@ return ret; }
+/* For compatibility with glibc 2.1.3 */ +#ifndef CGC_DATA_WRITE +#define CGC_DATA_WRITE 1 +#endif +#ifndef CGC_DATA_READ +#define CGC_DATA_READ 2 +#endif +#ifndef CGC_DATA_NONE +#define CGC_DATA_NONE 3 +#endif + + /****************************************************************** * CDROM_ScsiPassThroughDirect * @@ -1035,7 +1051,7 @@ static DWORD CDROM_ScsiPassThroughDirect(int dev, PSCSI_PASS_THROUGH_DIRECT pPacket) { int ret = STATUS_NOT_SUPPORTED; -#if defined(linux) +#ifdef CDROM_SEND_PACKET struct cdrom_generic_command cmd; struct request_sense sense; int io; @@ -1057,8 +1073,9 @@ cmd.buffer = pPacket->DataBuffer; cmd.buflen = pPacket->DataTransferLength; cmd.sense = &sense; - cmd.quiet = 0; +#ifdef HAVE_CDROM_TIMEOUT cmd.timeout = pPacket->TimeOutValue*HZ; +#endif
switch (pPacket->DataIn) { @@ -1099,7 +1116,7 @@ static DWORD CDROM_ScsiPassThrough(int dev, PSCSI_PASS_THROUGH pPacket) { int ret = STATUS_NOT_SUPPORTED; -#if defined(linux) +#ifdef CDROM_SEND_PACKET struct cdrom_generic_command cmd; struct request_sense sense; int io; @@ -1128,8 +1145,9 @@ } cmd.buflen = pPacket->DataTransferLength; cmd.sense = &sense; - cmd.quiet = 0; +#ifdef HAVE_CDROM_TIMEOUT cmd.timeout = pPacket->TimeOutValue*HZ; +#endif
switch (pPacket->DataIn) {