*** plat_freebsd.c.orig	Mon Jan  5 17:00:50 1998
--- plat_freebsd.c	Fri Jan  9 08:04:06 1998
***************
*** 243,254 ****
  	}
  
  	if (ioctl(d->fd, CDIOCREADSUBCHANNEL, &sc)) {
! #ifdef __NetBSD__
  	    /* we need to release the device so the kernel will notice
  	       reloaded media */
  	    (void) close(d->fd);
  	    d->fd = -1;
! #endif
  		return (0);	/* ejected */
  	}
  
--- 243,254 ----
  	}
  
  	if (ioctl(d->fd, CDIOCREADSUBCHANNEL, &sc)) {
! //#ifdef __NetBSD__
  	    /* we need to release the device so the kernel will notice
  	       reloaded media */
  	    (void) close(d->fd);
  	    d->fd = -1;
! //#endif
  		return (0);	/* ejected */
  	}
  
***************
*** 398,407 ****
  	msf.end_f	= end % 75;
  
  	/* According to Marc van Kempen FreeBSD doesn't have CDIOCSTART -- Bernd */
! #ifndef __FreeBSD__
  	if (ioctl(d->fd, CDIOCSTART))
  		return (-1);
! #endif
  	if (ioctl(d->fd, CDIOCPLAYMSF, &msf))
  		return (-2);
  
--- 398,407 ----
  	msf.end_f	= end % 75;
  
  	/* According to Marc van Kempen FreeBSD doesn't have CDIOCSTART -- Bernd */
! 
  	if (ioctl(d->fd, CDIOCSTART))
  		return (-1);
! 
  	if (ioctl(d->fd, CDIOCPLAYMSF, &msf))
  		return (-2);
  
***************
*** 427,441 ****
  	if (fstatfs(stbuf.st_rdev, &buf) == 0)
  		return (-3);
  
! #ifdef __NetBSD__
  	rval = ioctl(d->fd, CDIOCALLOW);
  	if (rval == 0)
! #endif
  	    rval = ioctl(d->fd, CDIOCEJECT);
! #ifdef __NetBSD__
  	if (rval == 0)
  	    rval = ioctl(d->fd, CDIOCPREVENT);
! #endif
  	return rval;
  }
  
--- 427,441 ----
  	if (fstatfs(stbuf.st_rdev, &buf) == 0)
  		return (-3);
  
! 
  	rval = ioctl(d->fd, CDIOCALLOW);
  	if (rval == 0)
! 
  	    rval = ioctl(d->fd, CDIOCEJECT);
! 
  	if (rval == 0)
  	    rval = ioctl(d->fd, CDIOCPREVENT);
! 
  	return rval;
  }
  
