Index: sound-juicer-2.10.1/src/sj-util.c
===================================================================
--- sound-juicer-2.10.1.orig/src/sj-util.c
+++ sound-juicer-2.10.1/src/sj-util.c
@@ -157,7 +157,14 @@ tray_is_opened (const char *device)
   if (fd < 0) {
     return FALSE;
   }
-  
+
+#ifdef __FreeBSD__
+  status = FALSE;
+  ioctl (fd, CDIOCCLOSE);
+  close (fd);
+
+  return status;
+#else
   status = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
   if (status < 0) {
     close (fd);
@@ -167,6 +174,7 @@ tray_is_opened (const char *device)
   close (fd);
   
   return status == CDS_TRAY_OPEN;
+#endif
 }
 
 gboolean is_audio_cd (const char *device)
@@ -192,6 +200,7 @@ gboolean is_audio_cd (const char *device
       return FALSE;
   }
 
+#ifndef __FreeBSD__
   fd = open (device, O_RDONLY | O_NONBLOCK | O_EXCL);
   if (fd <0) {
     return FALSE;
@@ -206,6 +215,7 @@ gboolean is_audio_cd (const char *device
   close (fd);
 
   return status == CDS_AUDIO;
+#endif
 }
 
 /* Pass NULL to use g_free */
