* [LTP] [PATCH] quotactl07: add _GNU_SOURCE define
@ 2024-06-17 3:33 Li Wang
2024-06-17 23:23 ` Wei Gao via ltp
0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2024-06-17 3:33 UTC (permalink / raw)
To: ltp
To get rid of error on implicit declaration (glibc-2.39):
/usr/include/xfs/linux.h:188:15: error: implicit declaration of function
‘fallocate’; did you mean ‘alloca’? [-Wimplicit-function-declaration]
188 | ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
| ^~~~~~~~~
| alloca
make: *** [../../../../include/mk/rules.mk:45: quotactl07]
Error 1
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/kernel/syscalls/quotactl/quotactl07.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/syscalls/quotactl/quotactl07.c b/testcases/kernel/syscalls/quotactl/quotactl07.c
index 34ff2705d..d8ad3760a 100644
--- a/testcases/kernel/syscalls/quotactl/quotactl07.c
+++ b/testcases/kernel/syscalls/quotactl/quotactl07.c
@@ -13,6 +13,8 @@
* ("xfs: Sanity check flags of Q_XQUOTARM call").
*/
+#define _GNU_SOURCE
+#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
--
2.45.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] quotactl07: add _GNU_SOURCE define
2024-06-17 3:33 [LTP] [PATCH] quotactl07: add _GNU_SOURCE define Li Wang
@ 2024-06-17 23:23 ` Wei Gao via ltp
2024-06-19 16:06 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Wei Gao via ltp @ 2024-06-17 23:23 UTC (permalink / raw)
To: Li Wang; +Cc: ltp
On Mon, Jun 17, 2024 at 11:33:56AM +0800, Li Wang wrote:
> To get rid of error on implicit declaration (glibc-2.39):
>
> /usr/include/xfs/linux.h:188:15: error: implicit declaration of function
> ‘fallocate’; did you mean ‘alloca’? [-Wimplicit-function-declaration]
> 188 | ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
> | ^~~~~~~~~
> | alloca
> make: *** [../../../../include/mk/rules.mk:45: quotactl07]
> Error 1
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
> testcases/kernel/syscalls/quotactl/quotactl07.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/quotactl/quotactl07.c b/testcases/kernel/syscalls/quotactl/quotactl07.c
> index 34ff2705d..d8ad3760a 100644
> --- a/testcases/kernel/syscalls/quotactl/quotactl07.c
> +++ b/testcases/kernel/syscalls/quotactl/quotactl07.c
> @@ -13,6 +13,8 @@
> * ("xfs: Sanity check flags of Q_XQUOTARM call").
> */
>
> +#define _GNU_SOURCE
> +#include <fcntl.h>
> #include <errno.h>
> #include <unistd.h>
> #include <stdio.h>
> --
> 2.45.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by: Wei Gao <wegao@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] quotactl07: add _GNU_SOURCE define
2024-06-17 23:23 ` Wei Gao via ltp
@ 2024-06-19 16:06 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2024-06-19 16:06 UTC (permalink / raw)
To: Wei Gao; +Cc: ltp
Hi all,
workaround merged, thanks!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 16:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 3:33 [LTP] [PATCH] quotactl07: add _GNU_SOURCE define Li Wang
2024-06-17 23:23 ` Wei Gao via ltp
2024-06-19 16:06 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox