summaryrefslogtreecommitdiff
path: root/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-01-31 19:38:39 -0800
committerMichael Forney <mforney@mforney.org>2020-01-31 19:38:39 -0800
commit5dfe015e82b2e6190a706ca58ca055581b071c03 (patch)
tree00d9e6b5587ccf579b2ab8436ce4eb3d0e924536 /pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch
parent4a7996e2c966d051a6b8bd06138d3f719a01240c (diff)
strace: Some more portability fixes
Diffstat (limited to 'pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch')
-rw-r--r--pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch b/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch
new file mode 100644
index 00000000..667270c5
--- /dev/null
+++ b/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch
@@ -0,0 +1,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,
+ } };
+