b14ce6342b
is missing SCSI and CDDA support, however this does enable a number of other packages to now build, many of which do not depend on working cdparanoia for their own functionality.
69 lines
1.6 KiB
Text
69 lines
1.6 KiB
Text
$NetBSD: patch-cb,v 1.9 2013/12/12 16:41:32 jperkin Exp $
|
|
|
|
--- interface/low_interface.h.orig 2008-09-11 10:43:52.000000000 +0000
|
|
+++ interface/low_interface.h
|
|
@@ -26,6 +26,7 @@
|
|
#include <sys/time.h>
|
|
#include <sys/types.h>
|
|
|
|
+#ifdef __linux__
|
|
#include <linux/major.h>
|
|
#include <linux/version.h>
|
|
|
|
@@ -54,6 +55,26 @@
|
|
#include <linux/cdrom.h>
|
|
#include <linux/major.h>
|
|
|
|
+#elif defined(__sun)
|
|
+
|
|
+#include <sys/cdio.h>
|
|
+
|
|
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
|
+
|
|
+#include <sys/cdio.h>
|
|
+#include <sys/cdrio.h>
|
|
+
|
|
+#define CAM_NO_SCSI_INQUIRY
|
|
+#include <cam/scsi/scsi_message.h>
|
|
+#include <cam/scsi/scsi_sg.h>
|
|
+#include <camlib.h>
|
|
+
|
|
+#elif defined(__NetBSD__)
|
|
+
|
|
+#include <sys/scsiio.h>
|
|
+#include <sys/cdio.h>
|
|
+#endif
|
|
+
|
|
#include "cdda_interface.h"
|
|
|
|
#ifndef SG_EMULATED_HOST
|
|
@@ -100,17 +121,29 @@ typedef struct sg_io_hdr
|
|
struct cdda_private_data {
|
|
struct sg_header *sg_hd;
|
|
unsigned char *sg_buffer; /* points into sg_hd */
|
|
+#if defined(__APPLE__) && defined(__MACH__)
|
|
+ /* don't need clock */
|
|
+#else
|
|
clockid_t clock;
|
|
+#endif
|
|
int last_milliseconds;
|
|
};
|
|
|
|
#define MAX_RETRIES 8
|
|
#define MAX_BIG_BUFF_SIZE 65536
|
|
#define MIN_BIG_BUFF_SIZE 4096
|
|
+#ifdef __linux__
|
|
#define SG_OFF sizeof(struct sg_header)
|
|
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
|
+#define SG_OFF (0)
|
|
+#elif defined(__NetBSD__)
|
|
+#define SG_OFF sizeof(scsireq_t)
|
|
+#endif
|
|
|
|
extern int cooked_init_drive (cdrom_drive *d);
|
|
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
|
|
extern unsigned char *scsi_inquiry (cdrom_drive *d);
|
|
+#endif
|
|
extern int scsi_init_drive (cdrom_drive *d);
|
|
#ifdef CDDA_TEST
|
|
extern int test_init_drive (cdrom_drive *d);
|