67 lines
2.1 KiB
Text
67 lines
2.1 KiB
Text
$NetBSD: patch-aa,v 1.3 2005/12/11 21:28:14 joerg Exp $
|
|
|
|
--- unix/cdrommodule.c.orig 2003-08-31 23:24:30.000000000 +0000
|
|
+++ unix/cdrommodule.c
|
|
@@ -29,7 +29,7 @@
|
|
#include <linux/cdrom.h>
|
|
#endif
|
|
|
|
-#if defined(sun) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
|
+#if defined(sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
#include <sys/cdio.h>
|
|
#endif
|
|
|
|
@@ -45,7 +45,7 @@
|
|
* so that we don't have to repeat the code.
|
|
*/
|
|
|
|
-#ifdef __FreeBSD__
|
|
+#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
|
|
#define CDDB_TOC_HEADER_STRUCT ioc_toc_header
|
|
#define CDDB_STARTING_TRACK_FIELD starting_track
|
|
@@ -61,7 +61,7 @@
|
|
#define CDDB_DEFAULT_CDROM_DEVICE "/dev/cdrom"
|
|
#define CDDB_DEFAULT_CDROM_FLAGS 0
|
|
|
|
-#elif defined(__OpenBSD__)
|
|
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
|
|
|
#define CDDB_TOC_HEADER_STRUCT ioc_toc_header
|
|
#define CDDB_STARTING_TRACK_FIELD starting_track
|
|
@@ -151,7 +151,7 @@ static PyObject *cdrom_toc_entry(PyObjec
|
|
int cdrom_fd;
|
|
unsigned char track;
|
|
|
|
-#if defined(__OpenBSD__)
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
struct cd_toc_entry data;
|
|
#elif defined(__APPLE__)
|
|
dk_cd_read_track_info_t trackInfoParams;
|
|
@@ -184,7 +184,7 @@ static PyObject *cdrom_toc_entry(PyObjec
|
|
entry.CDDB_TRACK_FIELD = track;
|
|
entry.CDDB_FORMAT_FIELD = CDDB_MSF_FORMAT;
|
|
|
|
-#if defined(__OpenBSD__)
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
entry.data = &data;
|
|
entry.data_len = sizeof(data);
|
|
#endif
|
|
@@ -206,7 +206,7 @@ static PyObject *cdrom_leadout(PyObject
|
|
PyObject *cdrom_fileobj;
|
|
int cdrom_fd;
|
|
|
|
-#if defined(__OpenBSD__)
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
struct cd_toc_entry data;
|
|
#elif defined(__APPLE__)
|
|
struct CDDB_TOC_HEADER_STRUCT hdr;
|
|
@@ -250,7 +250,7 @@ static PyObject *cdrom_leadout(PyObject
|
|
entry.CDDB_TRACK_FIELD = CDDB_CDROM_LEADOUT;
|
|
entry.CDDB_FORMAT_FIELD = CDDB_MSF_FORMAT;
|
|
|
|
-#if defined(__OpenBSD__)
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
entry.data = &data;
|
|
entry.data_len = sizeof(data);
|
|
#endif
|