summaryrefslogtreecommitdiff
path: root/media-sound/cdtool/files/cdtool-2.1.8-fix_c23.patch
blob: 96af77b395ca60bcb70f0b012ba45c486e3cd24f (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
use getopt from glibc/musl, bug 945335
add missing include, bugs 712586, 896426
fix unprototype functions
--- a/commands.c
+++ b/commands.c
@@ -26,6 +26,7 @@
 #include <errno.h>
 #include <string.h>
 #include <signal.h>
+#include <fcntl.h>
 
 #include "config.h"
 #include "cdtool.h"
--- a/shuffle.c
+++ b/shuffle.c
@@ -59,7 +59,7 @@
  *       you don't like a song.  
  */
 /************************************************************************/
-void huphdl ()
+void huphdl (int signum)
 {
     signal (SIGHUP, huphdl);
     iNext = TRUE;
@@ -79,7 +79,7 @@
  *       stop playing, remove its PID file, and exit. 
  */
 /************************************************************************/
-void inthdl ()
+void inthdl (int signum)
 {
     signal (SIGINT, inthdl);
     iDone = TRUE;
--- a/cdown.c
+++ b/cdown.c
@@ -652,8 +653,6 @@
 /************************************************************************/
 int main(int argc, char *argv[]) {
 
-  extern int	optind, getopt();
-  extern char	*optarg;
   int		iListMode   = FALSE;
   int           error       = 0;
   char          *pszHost    = NULL;
--- a/cdctrl.c
+++ b/cdctrl.c
@@ -247,8 +248,6 @@
 int main (int argc, char *argv[])
 {
     cdtool_t cdtool;
-    extern int optind, getopt();
-    extern char *optarg;
     char *device = NULL;
     int opt=1;
 
--- a/cdtool.c
+++ b/cdtool.c
@@ -68,8 +69,6 @@
 {
   cdtool_t      cdtool;
   int		info=I_AUDIOSTATUS, error=0, opt, trk0=0, trk1=0;
-  extern int	optind, getopt();
-  extern char	*optarg;
 
   char p_format = P_LONG;
   char *device = NULL;