rendered paste body--- devices.c.orig Mon May 30 23:10:56 2005
+++ devices.c Wed Jul 27 21:33:32 2005
@@ -30,7 +30,19 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <fcntl.h>
+
+#ifdef __FreeBSD__
+#include <sys/cdio.h>
+
+#define CDROM_DRIVE_STATUS 0x5326
+#define CDS_NO_DISC 1
+#define CDS_TRAY_OPEN 2
+#define CDS_DRIVE_NOT_READY 3
+#define CDS_DISC_OK 4
+#define CDSL_CURRENT ((int) (~0U>>1))
+#else
#include <linux/cdrom.h>
+#endif
gint deviceadditionindex = 0;
@@ -714,9 +726,9 @@
}
- /* Use ioctl to send the CDROMEJECT command to the device
+ /* Use ioctl to send the CDROMEJECT (CDIOCEJECT on FreeBSD) command to the device
*/
- if (ioctl(cdrom,CDROMEJECT,0)<0)
+ if (ioctl(cdrom,CDIOCEJECT,0)<0)
{
g_warning("Error ejecting cd from device %s",device);
ret = FALSE;