Blame SOURCES/0118-types-skip-field-lines-that-start-with-comments.patch

d811e0
From b0a361c0a9095b396ff7100203c767ec9ffd2cfa Mon Sep 17 00:00:00 2001
d811e0
From: "Dmitry V. Levin" <ldv@altlinux.org>
d811e0
Date: Tue, 16 Jun 2020 08:00:00 +0000
d811e0
Subject: [PATCH] types: skip field lines that start with comments
d811e0
d811e0
This allows to exclude certain fields from type checks by placing
d811e0
comments at the beginning of the corresponding lines.
d811e0
d811e0
* types/find_last_type_fields.awk: Skip lines starting with spaces
d811e0
followed by "/".
d811e0
---
d811e0
 types/find_last_type_fields.awk | 2 +-
d811e0
 1 file changed, 1 insertion(+), 1 deletion(-)
d811e0
d811e0
Index: strace-5.7/types/find_last_type_fields.awk
d811e0
===================================================================
d811e0
--- strace-5.7.orig/types/find_last_type_fields.awk	2020-01-21 19:02:38.000000000 +0100
d811e0
+++ strace-5.7/types/find_last_type_fields.awk	2020-11-09 04:47:06.976785148 +0100
d811e0
@@ -17,7 +17,7 @@
d811e0
 		print a[1] "." last_field
d811e0
 		next
d811e0
 	}
d811e0
-	if (match($0, /^[[:space:]]+[^];:[]+[[:space:]]+([^][:space:];:[]+)(\[[^];:[]*\])?;.*$/, a)) {
d811e0
+	if (match($0, /^[[:space:]]+[^];[:space:]:\/[][^];:[]*[[:space:]]+([^][:space:];:[]+)(\[[^];:[]*\])?;.*$/, a)) {
d811e0
 		last_field = a[1]
d811e0
 		next
d811e0
 	}
d811e0
Index: strace-5.7/types/check-io_uring.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/types/check-io_uring.c	2020-11-09 04:47:06.977785139 +0100
d811e0
+++ strace-5.7/types/check-io_uring.c	2020-11-09 04:49:10.033732186 +0100
d811e0
@@ -14,13 +14,13 @@
d811e0
 #endif /* HAVE_STRUCT_IO_SQRING_OFFSETS */
d811e0
 
d811e0
 #ifdef HAVE_STRUCT_IO_CQRING_OFFSETS
d811e0
-# ifdef HAVE_STRUCT_IO_CQRING_OFFSETS_RESV
d811e0
+# ifdef HAVE_STRUCT_IO_CQRING_OFFSETS_CQES
d811e0
 static_assert(sizeof(struct io_cqring_offsets) == sizeof(struct_io_cqring_offsets),
d811e0
       "struct io_cqring_offsets size mismatch, please update the decoder or fix the kernel");
d811e0
 # else
d811e0
-static_assert(sizeof(struct io_cqring_offsets) <= offsetof(struct_io_cqring_offsets, resv),
d811e0
+static_assert(sizeof(struct io_cqring_offsets) <= offsetof(struct_io_cqring_offsets, cqes),
d811e0
 "struct io_cqring_offsets size mismatch, please update the decoder or fix the kernel");
d811e0
-# endif /* HAVE_STRUCT_IO_CQRING_OFFSETS_RESV */
d811e0
+# endif /* HAVE_STRUCT_IO_CQRING_OFFSETS_CQES */
d811e0
 #endif /* HAVE_STRUCT_IO_CQRING_OFFSETS */
d811e0
 
d811e0
 #ifdef HAVE_STRUCT_IO_URING_PARAMS
d811e0
Index: strace-5.7/config.h.in
d811e0
===================================================================
d811e0
--- strace-5.7.orig/config.h.in	2020-11-09 04:47:06.980785114 +0100
d811e0
+++ strace-5.7/config.h.in	2020-11-09 04:50:11.871203054 +0100
d811e0
@@ -2596,8 +2596,8 @@
d811e0
 /* Define to 1 if the system has the type `struct io_cqring_offsets'. */
d811e0
 #undef HAVE_STRUCT_IO_CQRING_OFFSETS
d811e0
 
d811e0
-/* Define to 1 if `resv' is a member of `struct io_cqring_offsets'. */
d811e0
-#undef HAVE_STRUCT_IO_CQRING_OFFSETS_RESV
d811e0
+/* Define to 1 if `cqes' is a member of `struct io_cqring_offsets'. */
d811e0
+#undef HAVE_STRUCT_IO_CQRING_OFFSETS_CQES
d811e0
 
d811e0
 /* Define to 1 if the system has the type `struct io_sqring_offsets'. */
d811e0
 #undef HAVE_STRUCT_IO_SQRING_OFFSETS
d811e0
Index: strace-5.7/configure
d811e0
===================================================================
d811e0
--- strace-5.7.orig/configure	2020-11-09 04:47:06.988785045 +0100
d811e0
+++ strace-5.7/configure	2020-11-09 04:51:12.500684263 +0100
d811e0
@@ -13475,13 +13475,13 @@
d811e0
 #define HAVE_STRUCT_IO_CQRING_OFFSETS 1
d811e0
 _ACEOF
d811e0
 
d811e0
-ac_fn_c_check_member "$LINENO" "struct io_cqring_offsets" "resv" "ac_cv_member_struct_io_cqring_offsets_resv" "$ac_includes_default
d811e0
+ac_fn_c_check_member "$LINENO" "struct io_cqring_offsets" "cqes" "ac_cv_member_struct_io_cqring_offsets_cqes" "$ac_includes_default
d811e0
 #include <linux/io_uring.h>
d811e0
 "
d811e0
-if test "x$ac_cv_member_struct_io_cqring_offsets_resv" = xyes; then :
d811e0
+if test "x$ac_cv_member_struct_io_cqring_offsets_cqes" = xyes; then :
d811e0
 
d811e0
 cat >>confdefs.h <<_ACEOF
d811e0
-#define HAVE_STRUCT_IO_CQRING_OFFSETS_RESV 1
d811e0
+#define HAVE_STRUCT_IO_CQRING_OFFSETS_CQES 1
d811e0
 _ACEOF
d811e0
 
d811e0