From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/1] lapi/io_uring: <sys/types.h> => <linux/types.h>
Date: Fri, 26 Jan 2024 16:29:54 +0100 [thread overview]
Message-ID: <ZbPP8pdtXnOsgA5Q@yuki> (raw)
In-Reply-To: <20240126111506.491324-1-pvorel@suse.cz>
Hi!
> This fixes compilation on old toolchains:
>
> Some old toolchains require to add <linux/types.h> to missing kernel
> types:
>
> tst_safe_io_uring.c: In function ‘safe_io_uring_init’:
> tst_safe_io_uring.c:34:45: error: ‘__u32’ undeclared (first use in this function)
> 34 | params->sq_entries * sizeof(__u32);
> | ^~~~~
>
> io_uring02.c: In function ‘drain_fallback’:
> io_uring02.c:106:34: error: ‘__u64’ undeclared (first use in this function)
> 106 | sqe_ptr->addr = (__u64)&spam_header;
> | ^~~~~
> io_uring02.c:106:34: note: each undeclared identifier is reported only once for each function it appears in
> io_uring02.c: In function ‘run’:
> io_uring02.c:221:26: error: ‘__u64’ undeclared (first use in this function)
> 221 | sqe_ptr->addr = (__u64)&beef_header;
> | ^~~~~
>
> Newer kernel headers includes <linux/types.h> in <linux/io_uring.h>, but
> we still support compilers without this header. Therefore replace
> <sys/types.h> in lapi header with <linux/types.h>.
I did look twice and we do not seem to use anything from the
<sys/types.h> in the header, so this should be safe.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-01-26 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 11:15 [LTP] [PATCH v2 1/1] lapi/io_uring: <sys/types.h> => <linux/types.h> Petr Vorel
2024-01-26 15:29 ` Cyril Hrubis [this message]
2024-01-27 5:54 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZbPP8pdtXnOsgA5Q@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox