* [PATCH] io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T check
@ 2020-08-26 15:37 Alistair Francis
2020-08-26 16:21 ` Adhemerval Zanella
0 siblings, 1 reply; 2+ messages in thread
From: Alistair Francis @ 2020-08-26 15:37 UTC (permalink / raw)
To: libc-alpha; +Cc: alistair23, alistair.francis
It's possible that although __OFF_T_MATCHES_OFF64_T is defined the
included the relevent header file. This results in a io/tst-lockf
failure for RV32 by calling the non 64-bit version of lockf. This
patch fixes the failure by including bits/types.h.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
io/lockf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io/lockf.c b/io/lockf.c
index aa5c673c8d..8ea83e15f0 100644
--- a/io/lockf.c
+++ b/io/lockf.c
@@ -15,6 +15,8 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <bits/types.h>
+
#ifndef __OFF_T_MATCHES_OFF64_T
#include <unistd.h>
--
2.28.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T check
2020-08-26 15:37 [PATCH] io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T check Alistair Francis
@ 2020-08-26 16:21 ` Adhemerval Zanella
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2020-08-26 16:21 UTC (permalink / raw)
To: libc-alpha
On 26/08/2020 12:37, Alistair Francis via Libc-alpha wrote:
> It's possible that although __OFF_T_MATCHES_OFF64_T is defined the
> included the relevent header file. This results in a io/tst-lockf
> failure for RV32 by calling the non 64-bit version of lockf. This
> patch fixes the failure by including bits/types.h.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
We don't use DCO, but rather Copyright assignment.
LGTM, thanks.
As a side note, I think it would be good to move __OFF_T_MATCHES_OFF64_T to be
*always* defined. It would get this issue early.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> io/lockf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/io/lockf.c b/io/lockf.c
> index aa5c673c8d..8ea83e15f0 100644
> --- a/io/lockf.c
> +++ b/io/lockf.c
> @@ -15,6 +15,8 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> +#include <bits/types.h>
> +
> #ifndef __OFF_T_MATCHES_OFF64_T
>
> #include <unistd.h>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-26 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 15:37 [PATCH] io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T check Alistair Francis
2020-08-26 16:21 ` Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).