From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] libltpnuma: Fix compilation with libnuma v1
Date: Fri, 8 Mar 2019 15:49:54 +0100 [thread overview]
Message-ID: <20190308144954.GA6533@dell5510> (raw)
In-Reply-To: <20190308135114.5120-1-chrubis@suse.cz>
Hi Cyril,
> With libnuma v1 HAVE_NUMA_H is defined but $(NUMA_LIBS) is not, which
> leads to compilation failures on very very old distributions.
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> CC: Petr Vorel <pvorel@suse.cz>
> CC: Jan Stancek <jstancek@redhat.com>
Acked-by: Petr Vorel <pvorel@suse.cz>
FYI c9e5e75e1 ("numa: Drop NUMA API v1 support")
There are other places, (testcases/kernel/mem/{lib,oom,vma}/),
but these might be ok (not using our libnuma).
Kind regards,
Petr
> ---
> libs/libltpnuma/tst_numa.c | 4 ++--
> testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c | 6 +++---
> testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c | 6 +++---
> testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c | 6 +++---
> testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c | 6 +++---
> 5 files changed, 14 insertions(+), 14 deletions(-)
> diff --git a/libs/libltpnuma/tst_numa.c b/libs/libltpnuma/tst_numa.c
> index 6bd23e949..0ba6daf39 100644
> --- a/libs/libltpnuma/tst_numa.c
> +++ b/libs/libltpnuma/tst_numa.c
> @@ -8,7 +8,7 @@
> #include <stdio.h>
> #include <ctype.h>
> #include "config.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> # include <numa.h>
> # include <numaif.h>
> #endif
> @@ -43,7 +43,7 @@ void tst_nodemap_free(struct tst_nodemap *nodes)
> free(nodes);
> }
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> const char *tst_numa_mode_name(int mode)
> {
> diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
> index d3c17bb9b..96a275411 100644
> --- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
> +++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c
> @@ -13,14 +13,14 @@
> #include <errno.h>
> #include "config.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> # include <numa.h>
> # include <numaif.h>
> #endif
> #include "tst_test.h"
> #include "tst_numa.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> #include "set_mempolicy.h"
> @@ -117,4 +117,4 @@ static struct tst_test test = {
> TST_TEST_TCONF(NUMA_ERROR_MSG);
> -#endif /* HAVE_NUMA_H */
> +#endif /* HAVE_NUMA_V2 */
> diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
> index e257c1c2c..4cdec1785 100644
> --- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
> +++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c
> @@ -14,14 +14,14 @@
> #include <errno.h>
> #include "config.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> # include <numa.h>
> # include <numaif.h>
> #endif
> #include "tst_test.h"
> #include "tst_numa.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> #include "set_mempolicy.h"
> @@ -116,4 +116,4 @@ static struct tst_test test = {
> TST_TEST_TCONF(NUMA_ERROR_MSG);
> -#endif /* HAVE_NUMA_H */
> +#endif /* HAVE_NUMA_V2 */
> diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
> index eb3e046f2..24775de10 100644
> --- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
> +++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c
> @@ -11,7 +11,7 @@
> #include <errno.h>
> #include "config.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> # include <numaif.h>
> # include <numa.h>
> #endif
> @@ -21,7 +21,7 @@
> #define MNTPOINT "mntpoint"
> #define PAGES_ALLOCATED 16u
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> #include "set_mempolicy.h"
> @@ -110,4 +110,4 @@ static struct tst_test test = {
> TST_TEST_TCONF(NUMA_ERROR_MSG);
> -#endif /* HAVE_NUMA_H */
> +#endif /* HAVE_NUMA_V2 */
> diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
> index 60601e7c1..8d8aa988d 100644
> --- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
> +++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c
> @@ -22,7 +22,7 @@
> #include <stdio.h>
> #include <errno.h>
> #include "config.h"
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> # include <numa.h>
> # include <numaif.h>
> #endif
> @@ -32,7 +32,7 @@
> #define MNTPOINT "mntpoint"
> #define FILES 10
> -#ifdef HAVE_NUMA_H
> +#ifdef HAVE_NUMA_V2
> #include "set_mempolicy.h"
> @@ -139,4 +139,4 @@ static struct tst_test test = {
> TST_TEST_TCONF(NUMA_ERROR_MSG);
> -#endif /* HAVE_NUMA_H */
> +#endif /* HAVE_NUMA_V2 */
next prev parent reply other threads:[~2019-03-08 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 13:51 [LTP] [PATCH] libltpnuma: Fix compilation with libnuma v1 Cyril Hrubis
2019-03-08 14:49 ` Petr Vorel [this message]
2019-03-08 14:53 ` Jan Stancek
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=20190308144954.GA6533@dell5510 \
--to=pvorel@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.