[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 4/4] modules/access/vcd/cdrom.c: ifdef some ioctls. Fix cdda enable on GNU/Hurd.



---
 modules/access/vcd/cdrom.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c
index e536315..81336b1 100644
--- a/modules/access/vcd/cdrom.c
+++ b/modules/access/vcd/cdrom.c
@@ -77,6 +77,9 @@
 #elif defined (__linux__)
 #   include <sys/ioctl.h>
 #   include <linux/cdrom.h>
+#elif defined (__GNU__)
+#   include <sys/ioctl.h>
+#   include <sys/cdrom.h>
 #elif defined( __OS2__ )
 #   include <os2.h>
 #else
@@ -665,6 +668,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev,
             p_msf->frame =  ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
 #undef p_msf
 
+#ifndef __GNU__
             if( ioctl( p_vcddev->i_device_handle, CDROMREADRAW,
                        p_block + i * VCD_SECTOR_SIZE ) == -1 )
             {
@@ -676,6 +680,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev,
                 else
                     break;
             }
+#endif
         }
 #endif
     }
@@ -1279,8 +1284,10 @@ static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev,
     gc.data_direction = CGC_DATA_READ;
     gc.timeout = 1000;
 
+#ifndef __GNU__
     if( ioctl( p_vcddev->i_device_handle, CDROM_SEND_PACKET, &gc ) == -1 )
         return VLC_EGENERIC;
+#endif
 
     /* If the size is less than 4 it is an error, if it 4 then
      * it means no text data */
@@ -1305,11 +1312,13 @@ static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev,
     gc.data_direction = CGC_DATA_READ;
     gc.timeout = 1000;
 
+#ifndef __GNU__
     if( ioctl( p_vcddev->i_device_handle, CDROM_SEND_PACKET, &gc ) == -1 )
     {
         free( p_text );
         return VLC_EGENERIC;
     }
+#endif
 
     /* */
     *pp_buffer = p_text;
-- 
1.9.0.rc3


Reply to: