From: xuyang2018.jy@fujitsu.com <xuyang2018.jy@fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/mallopt:fix compiling error
Date: Fri, 26 Mar 2021 03:03:39 +0000 [thread overview]
Message-ID: <605D4F1F.3020301@fujitsu.com> (raw)
In-Reply-To: <1616726772-29562-1-git-send-email-liuxp11@chinatelecom.cn>
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 prev parent reply other threads:[~2021-03-26 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 2:46 [LTP] [PATCH] syscalls/mallopt:fix compiling error Xinpeng Liu
2021-03-26 3:03 ` xuyang2018.jy [this message]
2021-03-26 3:08 ` liuxp11
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=605D4F1F.3020301@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
/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