summaryrefslogtreecommitdiff
path: root/dev-perl/Net-FreeDB/files/Net-FreeDB-0.100.0-c99.patch
blob: fc05d9863cd4b9483449d738a570859e68abbfde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
https://bugs.gentoo.org/883603
https://rt.cpan.org/Public/Bug/Display.html?id=152242

Description: define read_toc() before using it in discdata get_disc_id()
 otherwise the build fails with -Werror=implicit-function-declaration
Origin: vendor
Bug-Debian: https://bugs.debian.org/1065999
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2024-03-10

--- a/lib/linux.h
+++ b/lib/linux.h
@@ -46,28 +46,6 @@
     return ((n % 0xff) << 24 | t << 8 | tot_trks);
 }
 
-struct discdata get_disc_id(char* dev)
-{
-    struct discdata data;
-    int i;
-
-    data.num_of_trks = read_toc(dev);
-
-    if (data.num_of_trks == -1) {
-        return data;
-    }
-
-    data.discid = cddb_discid(data.num_of_trks);
-
-    for (i = 0; i < data.num_of_trks; i++) {
-        data.track_offsets[i] = (cdtoc[i].frame);
-    }
-
-    data.seconds = (cdtoc[data.num_of_trks].frame)/75;
-
-    return data;
-}
-
 int read_toc(char* dev)
 {
     int drive, i, status;
@@ -151,4 +129,26 @@
     return tochdr.cdth_trk1;
 }
 
+struct discdata get_disc_id(char* dev)
+{
+    struct discdata data;
+    int i;
+
+    data.num_of_trks = read_toc(dev);
+
+    if (data.num_of_trks == -1) {
+        return data;
+    }
+
+    data.discid = cddb_discid(data.num_of_trks);
+
+    for (i = 0; i < data.num_of_trks; i++) {
+        data.track_offsets[i] = (cdtoc[i].frame);
+    }
+
+    data.seconds = (cdtoc[data.num_of_trks].frame)/75;
+
+    return data;
+}
+
 #endif //LINUX_H