* [LTP] [PATCH] syscalls/mallopt:fix compiling error
@ 2021-03-26 2:46 Xinpeng Liu
2021-03-26 3:03 ` xuyang2018.jy
0 siblings, 1 reply; 3+ messages in thread
From: Xinpeng Liu @ 2021-03-26 2:46 UTC (permalink / raw)
To: ltp
mallopt01.c:33:3: warning: implicit declaration of function ?print_mallinfo?
[-Wimplicit-function-declaration]
print_mallinfo("Test uordblks", &info);
^
/tmp/ccOU0s7e.o: In function `test_mallopt':
/root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:37:
undefined reference to `print_mallinfo'
/root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:33:
undefined reference to `print_mallinfo'
Signed-off-by: Xinpeng Liu <liuxp11@chinatelecom.cn>
---
testcases/kernel/syscalls/mallopt/mallopt01.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/mallopt/mallopt01.c b/testcases/kernel/syscalls/mallopt/mallopt01.c
index 8ff4649..bb7234f 100644
--- a/testcases/kernel/syscalls/mallopt/mallopt01.c
+++ b/testcases/kernel/syscalls/mallopt/mallopt01.c
@@ -13,6 +13,7 @@
*/
+#define HAVE_MALLINFO
#include "../mallinfo/mallinfo_common.h"
#include "tst_safe_macros.h"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [LTP] [PATCH] syscalls/mallopt:fix compiling error
2021-03-26 2:46 [LTP] [PATCH] syscalls/mallopt:fix compiling error Xinpeng Liu
@ 2021-03-26 3:03 ` xuyang2018.jy
2021-03-26 3:08 ` liuxp11
0 siblings, 1 reply; 3+ messages in thread
From: xuyang2018.jy @ 2021-03-26 3:03 UTC (permalink / raw)
To: ltp
Hi Liu
> mallopt01.c:33:3: warning: implicit declaration of function ?print_mallinfo?
> [-Wimplicit-function-declaration]
> print_mallinfo("Test uordblks",&info);
> ^
> /tmp/ccOU0s7e.o: In function `test_mallopt':
> /root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:37:
> undefined reference to `print_mallinfo'
> /root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:33:
> undefined reference to `print_mallinfo'
Usually, if glibc supports mallopt, it should also support mallinfo. So
I guess you met this problem because your compile enviroment wat not clean.
Please try again as the following step:
make distclean
make autotools
./configure
cd testcases/kernel/syscalls/mallopt/
make
>
> Signed-off-by: Xinpeng Liu<liuxp11@chinatelecom.cn>
> ---
> testcases/kernel/syscalls/mallopt/mallopt01.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/syscalls/mallopt/mallopt01.c b/testcases/kernel/syscalls/mallopt/mallopt01.c
> index 8ff4649..bb7234f 100644
> --- a/testcases/kernel/syscalls/mallopt/mallopt01.c
> +++ b/testcases/kernel/syscalls/mallopt/mallopt01.c
> @@ -13,6 +13,7 @@
> */
>
>
> +#define HAVE_MALLINFO
We have checked mallinfo function in configure.ac. We never define this
directly.
> #include "../mallinfo/mallinfo_common.h"
> #include "tst_safe_macros.h"
>
Best Regards
Yang Xu
^ permalink raw reply [flat|nested] 3+ messages in thread* [LTP] [PATCH] syscalls/mallopt:fix compiling error
2021-03-26 3:03 ` xuyang2018.jy
@ 2021-03-26 3:08 ` liuxp11
0 siblings, 0 replies; 3+ messages in thread
From: liuxp11 @ 2021-03-26 3:08 UTC (permalink / raw)
To: ltp
Thanks,please ignore this patch.
From: xuyang2018.jy@fujitsu.com
Date: 2021-03-26 11:03
To: Xinpeng Liu
CC: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/mallopt:fix compiling error
Hi Liu
> mallopt01.c:33:3: warning: implicit declaration of function ?print_mallinfo?
> [-Wimplicit-function-declaration]
> print_mallinfo("Test uordblks",&info);
> ^
> /tmp/ccOU0s7e.o: In function `test_mallopt':
> /root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:37:
> undefined reference to `print_mallinfo'
> /root/mywork/ltp_github/testcases/kernel/syscalls/mallopt/mallopt01.c:33:
> undefined reference to `print_mallinfo'
Usually, if glibc supports mallopt, it should also support mallinfo. So
I guess you met this problem because your compile enviroment wat not clean.
Please try again as the following step:
make distclean
make autotools
./configure
cd testcases/kernel/syscalls/mallopt/
make
>
> Signed-off-by: Xinpeng Liu<liuxp11@chinatelecom.cn>
> ---
> testcases/kernel/syscalls/mallopt/mallopt01.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/syscalls/mallopt/mallopt01.c b/testcases/kernel/syscalls/mallopt/mallopt01.c
> index 8ff4649..bb7234f 100644
> --- a/testcases/kernel/syscalls/mallopt/mallopt01.c
> +++ b/testcases/kernel/syscalls/mallopt/mallopt01.c
> @@ -13,6 +13,7 @@
> */
>
>
> +#define HAVE_MALLINFO
We have checked mallinfo function in configure.ac. We never define this
directly.
> #include "../mallinfo/mallinfo_common.h"
> #include "tst_safe_macros.h"
>
Best Regards
Yang Xu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210326/3fc13610/attachment-0001.htm>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-26 3:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-26 2:46 [LTP] [PATCH] syscalls/mallopt:fix compiling error Xinpeng Liu
2021-03-26 3:03 ` xuyang2018.jy
2021-03-26 3:08 ` liuxp11
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox