diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2022-06-12 19:32:22 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2022-06-12 17:32:22 +0000 |
commit | aeb29a3238ef3cc7f191f98743678d3b4ec949b9 (patch) | |
tree | 16c984b7cd9d001e34b78de1a76fecd6dc06f99c /configure.ac | |
parent | 505de19f84c68f378fcc48dd6c42a6a1240de477 (diff) | |
download | strace-aeb29a3238ef3cc7f191f98743678d3b4ec949b9.tar.gz |
io_uring: work aroung struct io_uring_rsrc_register field name change
resv field has been renamed to flags in Linux commit v5.19-rc1~251^2~20,
provide a shim to support old decoding syntax.
* configure.ac (AC_CHECK_TYPES): Add struct io_uring_rsrc_register
and struct io_uring_rsrc_register.resv checks.
* src/io_uring.c [HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV):
Define as resv.
[!HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as flags.
(print_io_uring_register_rsrc): Use RESV instead of resv; print "resv"
field name explicitly and use PRINT_VAL_X instead of PRINT_FIELD_X.
* tests/io_uring_register.c [HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV):
Define as resv.
[!HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as flags.
(main): Use RESV to access struct io_uring_rsrc_register.resv field.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 27faa1a81..ef9810dd0 100644 --- a/configure.ac +++ b/configure.ac @@ -571,6 +571,12 @@ AC_CHECK_MEMBERS(m4_normalize([ struct iocb.aio_rw_flags ]),,, [#include <linux/aio_abi.h>]) +AC_CHECK_TYPES([struct io_uring_rsrc_register], [ + AC_CHECK_MEMBERS(m4_normalize([ + struct io_uring_rsrc_register.resv + ]),,, [#include <linux/io_uring.h>]) +],, [#include <linux/io_uring.h>]) + CPPFLAGS="$saved_CPPFLAGS" st_CHECK_ENUMS |