summaryrefslogtreecommitdiff
blob: 2a51ddea4708012147189fe69f04ca0b52497363 (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
Taken from: https://github.com/OpenAoE/vblade/pull/15
Author: Andreas Kölbl <koelblandreas@freenet.de>

--- /dev/null
+++ b/dat.c
@@ -0,0 +1,12 @@
+/* dat.c: Global memory for vblade AoE target */
+#include "dat.h"
+
+int	shelf, slot;
+ulong	aoetag;
+uchar	mac[6];
+int	bfd;		// block file descriptor
+int	sfd;		// socket file descriptor
+vlong	size;		// size of vblade
+vlong	offset;
+char	*progname;
+char	serial[Nserial+1];
--- a/dat.h
+++ b/dat.h
@@ -1,4 +1,5 @@
 /* dat.h: include file for vblade AoE target */
+#include <sys/types.h>
 
 #define	nil	((void *)0)
 /*
@@ -163,12 +164,12 @@ enum {
 	Nserial= 20,
 };
 
-int	shelf, slot;
-ulong	aoetag;
-uchar	mac[6];
-int	bfd;		// block file descriptor
-int	sfd;		// socket file descriptor
-vlong	size;		// size of vblade
-vlong	offset;
-char	*progname;
-char	serial[Nserial+1];
+extern int	shelf, slot;
+extern ulong	aoetag;
+extern uchar	mac[6];
+extern int	bfd;		// block file descriptor
+extern int	sfd;		// socket file descriptor
+extern vlong	size;		// size of vblade
+extern vlong	offset;
+extern char	*progname;
+extern char	serial[Nserial+1];