"Gerald Pfeifer" gerald@pfeifer.com wrote:
The following change to dlls/ntdll/cdrom.c
revision 1.57 date: 2005/06/27 12:07:49; author: julliard; state: Exp; lines: +13 -19 Dmitry Timoshkov dmitry@codeweavers.com Add a check for sg_io_hdr_t and (not tested) check for scsireq_t presence.
breaks on FreeBSD
cdrom.c: In function `CDROM_ScsiPassThroughDirect': cdrom.c:1419: error: invalid application of `sizeof' to an incomplete type cdrom.c:1411: warning: unused variable `io' cdrom.c: In function `CDROM_ScsiPassThrough': cdrom.c:1534: error: invalid application of `sizeof' to an incomplete type cdrom.c:1526: warning: unused variable `io'
which does not have struct request_sense, but does have struct scsi_request_sense in /usr/include/cam/scsi/scsi_all.h.
I would have tried to cobble up a patch guard these by #ifdef linux, but I'm not sure whether the patch to cdrom.c really was correct as it currently looks: defining struct linux_cdrom_generic_command in cdrom.c seems like quite bad a hack, doesn't it?
Attached patch is a workaround for the problem. A correct approach is to add a test for presence of the 'struct request_sense' to configure and add appropriate #ifdef's in the code.
Changelog: Dmitry Timoshkov dmitry@codeweavers.com A workaround for missing struct request_sense on FreeBSD.