patch-src_cddev_c 614 B

1234567891011121314151617181920212223242526
  1. $OpenBSD: patch-src_cddev_c,v 1.3 2005/06/30 22:34:29 alek Exp $
  2. --- src/cddev.c.orig Mon Jun 6 11:01:06 2005
  3. +++ src/cddev.c Mon Jun 6 11:03:07 2005
  4. @@ -52,7 +52,7 @@
  5. #define NON_BLOCKING
  6. #endif
  7. -#if defined(__FreeBSD__) || defined(__NetBSD__)
  8. +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
  9. #define CDIOREADSUBCHANNEL CDIOCREADSUBCHANNEL
  10. #endif
  11. @@ -638,7 +638,11 @@ gboolean CDEject(DiscInfo *disc)
  12. if(ioctl(disc->cd_desc,CDROMEJECT)<0)
  13. return FALSE;
  14. #endif
  15. -
  16. +#ifdef __OpenBSD__
  17. + close( disc->cd_desc );
  18. + disc->cd_desc = -1;
  19. +#endif
  20. +
  21. return TRUE;
  22. }