aboutsummaryrefslogtreecommitdiffstats
path: root/main/ipfw/type-correctness.patch
blob: 287dc2cfa70ea78c753b9be6c76ae6d68a18f316 (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
--- ipfw3-2012.orig/ipfw/include/timeconv.h
+++ ipfw3-2012/ipfw/include/timeconv.h
@@ -1,13 +1,15 @@
 /*
  * simple override for _long_to_time()
  */
+#include <stdint.h>
+
 #ifndef _TIMECONV_H_
 #define _TIMECONV_H_
 static __inline time_t
 _long_to_time(long tlong)
 {
-    if (sizeof(long) == sizeof(__int32_t))
-        return((time_t)(__int32_t)(tlong));
+    if (sizeof(long) == sizeof(int32_t))
+        return((time_t)(int32_t)(tlong));
     return((time_t)tlong);
 }
 
--- ipfw3-2012.orig/sys/netinet/ip_fw.h
+++ ipfw3-2012/sys/netinet/ip_fw.h
@@ -445,10 +445,10 @@
 
 /* Apply ipv6 mask on ipv6 addr */
 #define APPLY_MASK(addr,mask)                          \
-    (addr)->__u6_addr.__u6_addr32[0] &= (mask)->__u6_addr.__u6_addr32[0]; \
-    (addr)->__u6_addr.__u6_addr32[1] &= (mask)->__u6_addr.__u6_addr32[1]; \
-    (addr)->__u6_addr.__u6_addr32[2] &= (mask)->__u6_addr.__u6_addr32[2]; \
-    (addr)->__u6_addr.__u6_addr32[3] &= (mask)->__u6_addr.__u6_addr32[3];
+    (addr)->s6_addr32[0] &= (mask)->s6_addr32[0]; \
+    (addr)->s6_addr32[1] &= (mask)->s6_addr32[1]; \
+    (addr)->s6_addr32[2] &= (mask)->s6_addr32[2]; \
+    (addr)->s6_addr32[3] &= (mask)->s6_addr32[3];
 
 /* Structure for ipv6 */
 typedef struct _ipfw_insn_ip6 {