summaryrefslogtreecommitdiff
path: root/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch
blob: 667270c5a5d754d5ac9b5a82ab1fd33575f26109 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
diff --git a/xlat/btrfs_features_compat.h b/xlat/btrfs_features_compat.h
--- a/xlat/btrfs_features_compat.h	Thu Nov 28 14:53:27 2019
+++ b/xlat/btrfs_features_compat.h	Thu Jan 30 21:12:47 2020
@@ -13,13 +13,14 @@
 # else
 
 static const struct xlat_data btrfs_features_compat_xdata[] = {
+ {0}
 };
 #  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
 static
 #  endif
 const struct xlat btrfs_features_compat[1] = { {
  .data = btrfs_features_compat_xdata,
- .size = ARRAY_SIZE(btrfs_features_compat_xdata),
+ .size = ARRAY_SIZE(btrfs_features_compat_xdata) - 1,
  .type = XT_NORMAL,
 } };
 
diff --git a/xlat/mq_attr_flags.h b/xlat/mq_attr_flags.h
--- a/xlat/mq_attr_flags.h	Thu Nov 28 14:53:27 2019
+++ b/xlat/mq_attr_flags.h	Thu Jan 30 21:03:53 2020
@@ -16,13 +16,14 @@
 #if defined(O_NONBLOCK) || (defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK)
   XLAT(O_NONBLOCK),
 #endif
+  {0}
 };
 #  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
 static
 #  endif
 const struct xlat mq_attr_flags[1] = { {
  .data = mq_attr_flags_xdata,
- .size = ARRAY_SIZE(mq_attr_flags_xdata),
+ .size = ARRAY_SIZE(mq_attr_flags_xdata) - 1,
  .type = XT_NORMAL,
 } };
 
diff --git a/xlat/sigprof_codes.h b/xlat/sigprof_codes.h
--- a/xlat/sigprof_codes.h	Thu Nov 28 14:53:27 2019
+++ b/xlat/sigprof_codes.h	Thu Jan 30 21:04:28 2020
@@ -16,13 +16,14 @@
 #if defined(PROF_SIG) || (defined(HAVE_DECL_PROF_SIG) && HAVE_DECL_PROF_SIG)
   XLAT(PROF_SIG),
 #endif
+  {0}
 };
 #  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
 static
 #  endif
 const struct xlat sigprof_codes[1] = { {
  .data = sigprof_codes_xdata,
- .size = ARRAY_SIZE(sigprof_codes_xdata),
+ .size = ARRAY_SIZE(sigprof_codes_xdata) - 1,
  .type = XT_NORMAL,
 } };
 
diff --git a/xlat/sock_ipx_options.h b/xlat/sock_ipx_options.h
--- a/xlat/sock_ipx_options.h	Thu Nov 28 14:53:27 2019
+++ b/xlat/sock_ipx_options.h	Thu Jan 30 20:29:04 2020
@@ -16,11 +16,12 @@
 #if defined(IPX_TYPE) || (defined(HAVE_DECL_IPX_TYPE) && HAVE_DECL_IPX_TYPE)
   XLAT(IPX_TYPE),
 #endif
+  {0}
 };
 static
 const struct xlat sock_ipx_options[1] = { {
  .data = sock_ipx_options_xdata,
- .size = ARRAY_SIZE(sock_ipx_options_xdata),
+ .size = ARRAY_SIZE(sock_ipx_options_xdata) - 1,
  .type = XT_NORMAL,
 } };