aboutsummaryrefslogtreecommitdiff
path: root/audio/cdparanoia/files/patch-interface_low__interface.h
blob: 4d8f491e44550a1a86d3dedd9cb3cac7dc992fbc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Index: interface/low_interface.h
===================================================================
RCS file: /home/cvs/cdparanoia/interface/low_interface.h,v
retrieving revision 1.1.1.1
retrieving revision 1.3
--- interface/low_interface.h.orig	2001-03-26 06:12:11 UTC
+++ interface/low_interface.h
@@ -25,6 +25,8 @@
 #include <sys/time.h>
 #include <sys/types.h>
 
+#ifdef Linux
+
 #include <linux/major.h>
 #include <linux/version.h>
 
@@ -48,12 +50,27 @@
 #include <linux/cdrom.h>
 #include <linux/major.h>
 
+#elif defined(__FreeBSD__)
+
+#include <sys/cdio.h>
+#include <sys/cdrio.h>
+
+#include <cam/scsi/scsi_message.h>
+#include <camlib.h>
+
+#endif
+
 #include "cdda_interface.h"
 
 #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)
+#else
+#define SG_OFF (0)
+#endif
 
 #ifndef SG_EMULATED_HOST
 /* old kernel version; the check for the ioctl is still runtime, this
@@ -64,7 +81,9 @@
 #endif
 
 extern int  cooked_init_drive (cdrom_drive *d);
+#ifdef Linux
 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);