$NetBSD: patch-ch,v 1.1 2003/10/20 12:08:03 grant Exp $ --- interface/cdda_interface.h.orig 2001-03-24 12:15:46.000000000 +1100 +++ interface/cdda_interface.h @@ -21,6 +21,11 @@ #include #include +#ifdef __FreeBSD__ +#include +#include +#endif + #define MAXTRK 100 typedef struct TOC { /* structure of table of contents */ @@ -46,14 +51,20 @@ typedef struct cdrom_drive{ int opened; /* This struct may just represent a candidate for opening */ +#ifndef __FreeBSD__ char *cdda_device_name; char *ioctl_device_name; int cdda_fd; - int ioctl_fd; - char *drive_model; int drive_type; +#else + struct cam_device *dev; + union ccb *ccb; +#endif + + int ioctl_fd; + char *drive_model; int interface; int bigendianp; int nsectors; @@ -83,9 +94,13 @@ typedef struct cdrom_drive{ int is_mmc; /* SCSI command buffer and offset pointers */ +#ifndef __FreeBSD__ unsigned char *sg; unsigned char *sg_buffer; unsigned char inqbytes[4]; +#else + unsigned char *sg_buffer; +#endif /* Scsi parameters and state */ unsigned char density;