1 Star 0 Fork 29

hwzjyggsddu/strace

forked from src-openEuler/strace 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-uring-fix-build-against-5.8-libc-headers.patch 3.32 KB
一键复制 编辑 原始数据 按行查看 历史
靳智敏 提交于 2020-11-10 15:18 . fix master build error
From 8dda6b8ddbe18b6bb83cf1fa6bc71ebdc82e1b72 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Tue, 10 Nov 2020 10:53:58 +0800
Subject: [PATCH] uring: fix build against 5.8 libc-headers
To get strace building against v5.8 headers before the next
version of strace is released, we need to copy in a bootstrapped
file from the latest git (xlat/uring_cqring_flags.h) and remove
remove unnecessary asserts for v5.8+ (in a similar manner to the
main strace repository).
Upstream-status: inappropriate. oe specific (upstream builds bootstrap)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
https://patchwork.openembedded.org/patch/175096/
---
types/check-io_uring.c | 10 --------
xlat/uring_cqring_flags.h | 48 +++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 10 deletions(-)
create mode 100644 xlat/uring_cqring_flags.h
diff --git a/types/check-io_uring.c b/types/check-io_uring.c
index dc21569..d5bd4b1 100644
--- a/types/check-io_uring.c
+++ b/types/check-io_uring.c
@@ -13,16 +13,6 @@ static_assert(sizeof(struct io_sqring_offsets) <= offsetof(struct_io_sqring_offs
# endif /* HAVE_STRUCT_IO_SQRING_OFFSETS_RESV2 */
#endif /* HAVE_STRUCT_IO_SQRING_OFFSETS */
-#ifdef HAVE_STRUCT_IO_CQRING_OFFSETS
-# ifdef HAVE_STRUCT_IO_CQRING_OFFSETS_RESV
-static_assert(sizeof(struct io_cqring_offsets) == sizeof(struct_io_cqring_offsets),
- "struct io_cqring_offsets size mismatch, please update the decoder or fix the kernel");
-# else
-static_assert(sizeof(struct io_cqring_offsets) <= offsetof(struct_io_cqring_offsets, resv),
-"struct io_cqring_offsets size mismatch, please update the decoder or fix the kernel");
-# endif /* HAVE_STRUCT_IO_CQRING_OFFSETS_RESV */
-#endif /* HAVE_STRUCT_IO_CQRING_OFFSETS */
-
#ifdef HAVE_STRUCT_IO_URING_PARAMS
# ifdef HAVE_STRUCT_IO_URING_PARAMS_CQ_OFF
static_assert(sizeof(struct io_uring_params) == sizeof(struct_io_uring_params),
diff --git a/xlat/uring_cqring_flags.h b/xlat/uring_cqring_flags.h
new file mode 100644
index 0000000..0352749
--- /dev/null
+++ b/xlat/uring_cqring_flags.h
@@ -0,0 +1,48 @@
+/* Generated by ./xlat/gen.sh from ./xlat/uring_cqring_flags.in; do not edit. */
+
+#include "gcc_compat.h"
+#include "static_assert.h"
+
+#if defined(IORING_CQ_EVENTFD_DISABLED) || (defined(HAVE_DECL_IORING_CQ_EVENTFD_DISABLED) && HAVE_DECL_IORING_CQ_EVENTFD_DISABLED)
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((IORING_CQ_EVENTFD_DISABLED) == (1U), "IORING_CQ_EVENTFD_DISABLED != 1U");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#else
+# define IORING_CQ_EVENTFD_DISABLED 1U
+#endif
+
+#ifndef XLAT_MACROS_ONLY
+
+# ifdef IN_MPERS
+
+# error static const struct xlat uring_cqring_flags in mpers mode
+
+# else
+
+static const struct xlat_data uring_cqring_flags_xdata[] = {
+ XLAT(IORING_CQ_EVENTFD_DISABLED),
+ #define XLAT_VAL_0 ((unsigned) (IORING_CQ_EVENTFD_DISABLED))
+ #define XLAT_STR_0 STRINGIFY(IORING_CQ_EVENTFD_DISABLED)
+};
+static
+const struct xlat uring_cqring_flags[1] = { {
+ .data = uring_cqring_flags_xdata,
+ .size = ARRAY_SIZE(uring_cqring_flags_xdata),
+ .type = XT_NORMAL,
+ .flags_mask = 0
+# ifdef XLAT_VAL_0
+ | XLAT_VAL_0
+# endif
+ ,
+ .flags_strsz = 0
+# ifdef XLAT_STR_0
+ + sizeof(XLAT_STR_0)
+# endif
+ ,
+} };
+
+# undef XLAT_STR_0
+# undef XLAT_VAL_0
+# endif /* !IN_MPERS */
+
+#endif /* !XLAT_MACROS_ONLY */
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hwzjyggsddu/strace.git
git@gitee.com:hwzjyggsddu/strace.git
hwzjyggsddu
strace
strace
master

搜索帮助