summaryrefslogtreecommitdiff
blob: 194b8a5866cc56fa8d9f2e703d311666486f8e24 (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
--- a/cec.c
+++ b/cec.c
@@ -20,6 +20,9 @@
 typedef struct Shelf Shelf;
 typedef struct Pkt Pkt;
 
+int debug;
+char *progname;
+
 struct Pkt {
 	uchar		dst[6];
 	uchar		src[6];
@@ -77,5 +80,5 @@ extern int errno;
 int	ntab;
 uchar	contag;
-extern 	int fd;		/* set in netopen */
+int fd;		/* set in netopen */
 int	shelf;
 Shelf	*connp;
--- a/cec.h
+++ b/cec.h
@@ -6,8 +6,8 @@ typedef unsigned char uchar;
 typedef unsigned int uint;
 #endif
 
-int debug;
-char *progname;
+extern int debug;
+extern char *progname;
 extern char hbacecfile[];
 
 int netopen(char *name);
--- a/hba.c
+++ b/hba.c
@@ -9,7 +9,7 @@
 
 #include "cec.h"
 
-int fd;
+extern int fd;
 static char hba_bytes[1<<14];
 static int hba_len;
 
--- a/linux.c
+++ b/linux.c
@@ -25,7 +25,8 @@
 
 #include "cec.h"
 
-int fd;
+extern int fd;
+extern int debug;
 char net_bytes[1<<14];
 int net_len;
 char srcaddr[6];