16979
|
1 |
--- libdiscid-0.1.1/src/disc_solaris.c.orig 2007-07-30 10:30:44.305278610 +0700
|
|
2 |
+++ libdiscid-0.1.1/src/disc_solaris.c 2007-07-30 10:37:14.815554646 +0700
|
|
3 |
@@ -30,14 +30,14 @@
|
|
4 |
#include <sys/ioctl.h>
|
|
5 |
#include <fcntl.h>
|
|
6 |
#include <unistd.h>
|
|
7 |
-#include <linux/cdrom.h>
|
|
8 |
+#include <sys/cdio.h>
|
|
9 |
#include <assert.h>
|
|
10 |
|
|
11 |
|
|
12 |
#include "discid/discid_private.h"
|
|
13 |
|
|
14 |
|
|
15 |
-#define MB_DEFAULT_DEVICE "/dev/cdrom"
|
|
16 |
+#define MB_DEFAULT_DEVICE "/dev/sr0"
|
|
17 |
|
|
18 |
#define XA_INTERVAL ((60 + 90 + 2) * CD_FRAMES)
|
|
19 |
|
|
20 |
@@ -48,7 +48,7 @@
|
|
21 |
|
|
22 |
static int read_toc_header(int fd, int *first, int *last) {
|
|
23 |
struct cdrom_tochdr th;
|
|
24 |
- struct cdrom_multisession ms;
|
|
25 |
+ // struct cdrom_multisession ms;
|
|
26 |
|
|
27 |
int ret = ioctl(fd, CDROMREADTOCHDR, &th);
|
|
28 |
|
|
29 |
@@ -63,11 +63,11 @@
|
|
30 |
* currently only dual-session discs with one track in the second
|
|
31 |
* session are handled correctly.
|
|
32 |
*/
|
|
33 |
- ms.addr_format = CDROM_LBA;
|
|
34 |
- ret = ioctl(fd, CDROMMULTISESSION, &ms);
|
|
35 |
-
|
|
36 |
- if ( ms.xa_flag )
|
|
37 |
- (*last)--;
|
|
38 |
+// ms.addr_format = CDROM_LBA;
|
|
39 |
+// ret = ioctl(fd, CDROMMULTISESSION, &ms);
|
|
40 |
+//
|
|
41 |
+// if ( ms.xa_flag )
|
|
42 |
+// (*last)--;
|
|
43 |
|
|
44 |
return ret;
|
|
45 |
}
|
|
46 |
@@ -92,16 +92,16 @@
|
|
47 |
|
|
48 |
|
|
49 |
static int read_leadout(int fd, unsigned long *lba) {
|
|
50 |
- struct cdrom_multisession ms;
|
|
51 |
+ // struct cdrom_multisession ms;
|
|
52 |
int ret;
|
|
53 |
|
|
54 |
- ms.addr_format = CDROM_LBA;
|
|
55 |
- ret = ioctl(fd, CDROMMULTISESSION, &ms);
|
|
56 |
-
|
|
57 |
- if ( ms.xa_flag ) {
|
|
58 |
- *lba = ms.addr.lba - XA_INTERVAL;
|
|
59 |
- return ret;
|
|
60 |
- }
|
|
61 |
+// ms.addr_format = CDROM_LBA;
|
|
62 |
+// ret = ioctl(fd, CDROMMULTISESSION, &ms);
|
|
63 |
+//
|
|
64 |
+// if ( ms.xa_flag ) {
|
|
65 |
+// *lba = ms.addr.lba - XA_INTERVAL;
|
|
66 |
+// return ret;
|
|
67 |
+// }
|
|
68 |
|
|
69 |
return read_toc_entry(fd, CDROM_LEADOUT, lba);
|
|
70 |
}
|
|
71 |
--- libdiscid-0.1.1/configure.ac.orig 2007-07-30 10:06:43.836430441 +0700
|
|
72 |
+++ libdiscid-0.1.1/configure.ac 2007-07-30 10:08:22.851599959 +0700
|
|
73 |
@@ -25,7 +25,7 @@
|
|
74 |
#*-netbsd*) os=netbsd ;;
|
|
75 |
#*-openbsd*) os=openbsd ;;
|
|
76 |
#*-os2_emx*) os=os2 ;;
|
|
77 |
- #*-solaris*) os=solaris; LIBS='-lsocket -lnsl' ;;
|
|
78 |
+ *-solaris*) os=solaris; LIBS='-lsocket -lnsl' ;;
|
|
79 |
#*-qnx*) os=qnx; LIBS='-lsocket' ;;
|
|
80 |
*) AC_MSG_ERROR([unsupported operating system]) ;;
|
|
81 |
esac
|