$NetBSD: patch-aa,v 1.3 2005/10/16 12:14:13 jmmv Exp $

--- src/plparse/totem-disc.c.orig	2005-03-13 14:37:57.000000000 +0100
+++ src/plparse/totem-disc.c
@@ -34,7 +34,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <mntent.h>
 #include <string.h>
 
 #include <sys/ioctl.h>
@@ -44,7 +43,31 @@
 #include <glib/gi18n.h>
 #include <libgnomevfs/gnome-vfs.h>
 
+#if defined(__linux__)
 #include <linux/cdrom.h>
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/cdio.h>
+#include <sys/disklabel.h>
+
+#define CDROM_DRIVE_STATUS    0x5326
+#define CDROM_DISC_STATUS     0x5327
+#define CDS_AUDIO             100
+#define CDS_MIXED             105
+#define CDS_DATA_1            101
+#define CDS_DATA_2            102
+#define CDS_NO_INFO           0       /* if not implemented */
+#define CDS_NO_DISC           1
+#define CDS_TRAY_OPEN         2
+#define CDS_DRIVE_NOT_READY   3
+#define CDS_DISC_OK           4
+#define CDS_XA_2_1            103
+#define CDS_XA_2_2            104
+#define CDC_DVD                       0x8000
+#define ENOMEDIUM ENODEV
+#define CDROM_GET_CAPABILITY CDIOCCLRDEBUG
+#else
+#error "No support to access the CD in this platform."
+#endif
 
 #include "totem-disc.h"
 
