Package: siggen / 2.3.10-9

devname_already_used_in_freebsd_headers Patch series | download
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
Description: rename devname, as this symbol is already used in freebsd
Author: Christoph Egger

Index: siggen-2.3.10/mixer.c
===================================================================
--- siggen-2.3.10.orig/mixer.c	2001-08-19 18:50:18.000000000 +0200
+++ siggen-2.3.10/mixer.c	2011-11-29 15:21:32.000000000 +0100
@@ -26,7 +26,7 @@
 int recmask=0;          /* Defines which devices can be an input device */
 int sources=0;          /* Defines which devices are the current input dev(s) */
 int stereodevs=0;       /* Defines which devices are stereo */
-char *devname[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
+char *mydevname[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
                         /* Gives a list of names for the various mixer channels */
 
 /* mixinit(DEV)  open mixer device DEV and interrogate it setting up
Index: siggen-2.3.10/mixer.h
===================================================================
--- siggen-2.3.10.orig/mixer.h	2011-11-29 15:17:41.000000000 +0100
+++ siggen-2.3.10/mixer.h	2011-11-29 15:21:33.000000000 +0100
@@ -36,7 +36,7 @@
 #define IS_MIX_DEV_STEREO(N) (stereodevs&(1<<(N)))
 #define IS_MIX_SOURCE(N)    (sources&(1<<(N)))
 
-#define MIX_DEV_NAME(N)     (devname[N])
+#define MIX_DEV_NAME(N)     (mydevname[N])
 
 #define GET_MIX_VALUE(D,V)  (ioctl(mixFD, MIXER_READ(D), &V))
 #define SET_MIX_VALUE(D,V)  (ioctl(mixFD, MIXER_WRITE(D), &V))
@@ -45,7 +45,7 @@
  */
 
 extern int mixFD,devmask,recmask,sources,stereodevs;
-extern char *devname[];
+extern char *mydevname[];
 
 
 
Index: siggen-2.3.10/soundinfo.c
===================================================================
--- siggen-2.3.10.orig/soundinfo.c	2011-11-29 15:17:41.000000000 +0100
+++ siggen-2.3.10/soundinfo.c	2011-11-29 15:21:33.000000000 +0100
@@ -254,7 +254,7 @@
    int devmask,recmask,sources,stereodevs,capabilities;
    int i,n;
    char buf[130];
-   char *devname[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
+   char *mydevname[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS;
    int level[SOUND_MIXER_NRDEVICES];
    struct mixer_info Mix_Info;
 
@@ -294,10 +294,10 @@
       if (devmask & (1<<i)) {
 	 if (ioctl(fd, MIXER_READ(i), &n) < 0) {
 	    sprintf(buf,"Problem reading current level of mixer channel %s.",
-		    devname[i]);
+		    mydevname[i]);
 	    err_rpt(ENODEV,buf);
 	 } else {
-	    printf("  [0x%08X] %2d  %-6s  %3d",1<<i,i,devname[i],n&255);
+	    printf("  [0x%08X] %2d  %-6s  %3d",1<<i,i,mydevname[i],n&255);
 	    if (stereodevs & (1<<i)) { printf("/%3d ",(n>>8)&255);
 	    } else { printf("     "); }
             printf("%9s ", (recmask & (1<<i))? "source":"");