-
Notifications
You must be signed in to change notification settings - Fork 5
/
libbind-6.0-patch
65 lines (60 loc) · 1.77 KB
/
libbind-6.0-patch
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
--- libbind-6.0/include/netdb.h~ 2015-06-10 15:00:12.000000000 +0100
+++ libbind-6.0/include/netdb.h 2015-06-10 15:01:03.000000000 +0100
@@ -223,20 +223,16 @@
#define EAI_MAX 14
/*%
- * Flag values for getaddrinfo()
+ * Flag values for getaddrinfo() and getipnodebyname()
*/
#define AI_PASSIVE 0x00000001
#define AI_CANONNAME 0x00000002
#define AI_NUMERICHOST 0x00000004
-#define AI_MASK 0x00000007
-
-/*%
- * Flag values for getipnodebyname()
- */
#define AI_V4MAPPED 0x00000008
#define AI_ALL 0x00000010
#define AI_ADDRCONFIG 0x00000020
#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG)
+#define AI_MASK 0x0000003f
/*%
* Constants for getnameinfo()
--- libbind-6.0/include/arpa/nameser.h~ 2009-03-03 01:52:48.000000000 +0000
+++ libbind-6.0/include/arpa/nameser.h 2022-01-20 18:02:00.000000000 +0000
@@ -490,9 +490,9 @@
*/
#define NS_GET16(s, cp) do { \
register const u_char *t_cp = (const u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
+ (s) = (u_int16_t)(((u_int16_t)t_cp[0] << 8) \
+ | ((u_int16_t)t_cp[1]) \
+ ); \
(cp) += NS_INT16SZ; \
} while (0)
@@ -509,18 +509,18 @@
#define NS_PUT16(s, cp) do { \
register u_int16_t t_s = (u_int16_t)(s); \
register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
+ *t_cp++ = (u_char)(t_s >> 8); \
+ *t_cp = (u_char)(t_s); \
(cp) += NS_INT16SZ; \
} while (0)
#define NS_PUT32(l, cp) do { \
register u_int32_t t_l = (u_int32_t)(l); \
register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
+ *t_cp++ = (u_char)(t_l >> 24); \
+ *t_cp++ = (u_char)(t_l >> 16); \
+ *t_cp++ = (u_char)(t_l >> 8); \
+ *t_cp = (u_char)(t_l); \
(cp) += NS_INT32SZ; \
} while (0)