diff options
Diffstat (limited to 'multimedia/libdvdcss/files')
| -rw-r--r-- | multimedia/libdvdcss/files/patch-meson.build | 10 | ||||
| -rw-r--r-- | multimedia/libdvdcss/files/patch-src-ioctl.c | 31 | ||||
| -rw-r--r-- | multimedia/libdvdcss/files/patch-src-ioctl.h | 18 |
3 files changed, 59 insertions, 0 deletions
diff --git a/multimedia/libdvdcss/files/patch-meson.build b/multimedia/libdvdcss/files/patch-meson.build new file mode 100644 index 000000000000..3fbd102fe352 --- /dev/null +++ b/multimedia/libdvdcss/files/patch-meson.build @@ -0,0 +1,10 @@ +--- meson.build.orig 2025-09-23 08:43:53 UTC ++++ meson.build +@@ -46,6 +46,7 @@ check_headers = [ + 'io.h', + 'pwd.h', + 'scsi/sg.h', ++ 'cam/scsi/scsi_sg.h', + 'sys/ioctl.h', + 'sys/param.h', + 'sys/stat.h', diff --git a/multimedia/libdvdcss/files/patch-src-ioctl.c b/multimedia/libdvdcss/files/patch-src-ioctl.c new file mode 100644 index 000000000000..c7ec1ddb2ef8 --- /dev/null +++ b/multimedia/libdvdcss/files/patch-src-ioctl.c @@ -0,0 +1,31 @@ +--- src/ioctl.c.orig 2025-09-23 08:43:53 UTC ++++ src/ioctl.c +@@ -65,6 +65,10 @@ + # include <scsi/sg.h> + # include <stdlib.h> + #endif ++#ifdef HAVE_CAM_SCSI_SCSI_SG_H ++# include <cam/scsi/scsi_sg.h> ++# include <stdlib.h> ++#endif + #ifdef DVD_STRUCT_IN_DVD_H + # include <dvd.h> + #endif +@@ -1002,7 +1006,7 @@ int ioctl_ReadCPRMMediaId(int i_fd,int *p_agid, uint8_ + { + int i_ret; + +-#if defined( HAVE_LINUX_DVD_STRUCT ) && defined( HAVE_SCSI_SG_H ) ++#if (defined( HAVE_LINUX_DVD_STRUCT ) && defined( HAVE_SCSI_SG_H )) || (defined( HAVE_BSD_DVD_STRUCT ) && defined( HAVE_CAM_SCSI_SCSI_SG_H )) + struct sg_io_hdr io_hdr; + uint8_t sense[32] = {0}; + uint8_t cdb[12] = {0}; +@@ -1091,7 +1095,7 @@ int ioctl_ReadCPRMMKBPack(int i_fd, int *p_agid, int m + { + int i_ret; + +-#if defined( HAVE_LINUX_DVD_STRUCT ) && defined( HAVE_SCSI_SG_H ) ++#if (defined( HAVE_LINUX_DVD_STRUCT ) && defined( HAVE_SCSI_SG_H )) || (defined( HAVE_BSD_DVD_STRUCT ) && defined( HAVE_CAM_SCSI_SCSI_SG_H )) + uint8_t *sptd_buf = malloc( CPRM_MKB_PACK_SIZE + 4 ); + uint8_t cdb[12] = { 0 }; + uint8_t sense[32] = { 0 }; diff --git a/multimedia/libdvdcss/files/patch-src-ioctl.h b/multimedia/libdvdcss/files/patch-src-ioctl.h new file mode 100644 index 000000000000..a5a20aae73e1 --- /dev/null +++ b/multimedia/libdvdcss/files/patch-src-ioctl.h @@ -0,0 +1,18 @@ +--- src/ioctl.h.orig 2025-09-23 08:43:53 UTC ++++ src/ioctl.h +@@ -106,6 +106,7 @@ typedef union dvd_authinfo dvd_authinfo; + #define GPCMD_READ_DVD_STRUCTURE 0xad + #define GPCMD_REPORT_KEY 0xa4 + #define GPCMD_SEND_KEY 0xa3 ++#ifndef DVD_STRUCT_IN_SYS_DVDIO_H + /* DVD struct types */ + #define DVD_STRUCT_PHYSICAL 0x00 + #define DVD_STRUCT_COPYRIGHT 0x01 +@@ -122,6 +123,7 @@ typedef union dvd_authinfo dvd_authinfo; + #define DVD_REPORT_ASF 0x05 + #define DVD_SEND_RPC 0x06 + #define DVD_REPORT_RPC 0x08 ++#endif /* ndef DVD_STRUCT_IN_SYS_DVDIO_H */ + #define DVDCSS_INVALIDATE_AGID 0x3f + + /***************************************************************************** |
