aboutsummaryrefslogtreecommitdiffstats
path: root/main/libspf2/libspf2-libreplace-fix.patch
blob: 4f7c63a2fe82b9cd7636e710fadc4accc3b53530 (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
diff --git a/src/libreplace/__ns_initparse.c b/src/libreplace/__ns_initparse.c
index 10a7c9c..f22fa09 100644
--- a/src/libreplace/__ns_initparse.c
+++ b/src/libreplace/__ns_initparse.c
@@ -52,26 +52,6 @@ static void	setsection(ns_msg *msg, ns_sect sect);
 
 /* Public. */
 
-/* These need to be in the same order as the nres.h:ns_flag enum. */
-struct _ns_flagdata _ns_flagdata[16] = {
-	{ 0x8000, 15 },		/* qr. */
-	{ 0x7800, 11 },		/* opcode. */
-	{ 0x0400, 10 },		/* aa. */
-	{ 0x0200, 9 },		/* tc. */
-	{ 0x0100, 8 },		/* rd. */
-	{ 0x0080, 7 },		/* ra. */
-	{ 0x0040, 6 },		/* z. */
-	{ 0x0020, 5 },		/* ad. */
-	{ 0x0010, 4 },		/* cd. */
-	{ 0x000f, 0 },		/* rcode. */
-	{ 0x0000, 0 },		/* expansion (1/6). */
-	{ 0x0000, 0 },		/* expansion (2/6). */
-	{ 0x0000, 0 },		/* expansion (3/6). */
-	{ 0x0000, 0 },		/* expansion (4/6). */
-	{ 0x0000, 0 },		/* expansion (5/6). */
-	{ 0x0000, 0 },		/* expansion (6/6). */
-};
-
 int
 ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
 	const u_char *optr = ptr;
diff --git a/src/libreplace/__ns_msg_getflag.c b/src/libreplace/__ns_msg_getflag.c
index 19bfb88..a46c017 100644
--- a/src/libreplace/__ns_msg_getflag.c
+++ b/src/libreplace/__ns_msg_getflag.c
@@ -11,6 +11,25 @@
 #include "arpa_nameser.h"
 
 
+/* These need to be in the same order as the nres.h:ns_flag enum. */
+struct _ns_flagdata _ns_flagdata[16] = {
+	{ 0x8000, 15 },		/* qr. */
+	{ 0x7800, 11 },		/* opcode. */
+	{ 0x0400, 10 },		/* aa. */
+	{ 0x0200, 9 },		/* tc. */
+	{ 0x0100, 8 },		/* rd. */
+	{ 0x0080, 7 },		/* ra. */
+	{ 0x0040, 6 },		/* z. */
+	{ 0x0020, 5 },		/* ad. */
+	{ 0x0010, 4 },		/* cd. */
+	{ 0x000f, 0 },		/* rcode. */
+	{ 0x0000, 0 },		/* expansion (1/6). */
+	{ 0x0000, 0 },		/* expansion (2/6). */
+	{ 0x0000, 0 },		/* expansion (3/6). */
+	{ 0x0000, 0 },		/* expansion (4/6). */
+	{ 0x0000, 0 },		/* expansion (5/6). */
+	{ 0x0000, 0 },		/* expansion (6/6). */
+};
 
 int __ns_msg_getflag(ns_msg handle, int flag) {
 	return(((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift);