libltpnuma: Fix compilation with libnuma v1
PATCH 1/1 libltpnuma: Fix compilation with libnuma v1
With libnuma v1 HAVE_NUMA_H is defined but $(NUMA_LIBS) is not, which leads to compilation failures on very very old distributions.
--- 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(-)
libs/libltpnuma/tst_numa.c +2 -2
@@ -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) {
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +3 -3
@@ -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 */
testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +3 -3
@@ -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 */
testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +3 -3
@@ -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 */
testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +3 -3
@@ -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 */
Signature · 1 line
2.19.2
PATCH 1/1 libltpnuma: Fix compilation with libnuma v1
Hi Cyril,
Quoted 6 lines
With libnuma v1
HAVE_NUMA_His defined but $(NUMA_LIBS) is not, which leads to compilation failures on very very old distributions.Signed-off-by Cyril Hrubis <[email protected]>CC Petr Vorel <[email protected]>CC Jan Stancek <[email protected]>
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
Quoted 140 lines
--- 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(-)libs/libltpnuma/tst_numa.c +2
-2@@ -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) {testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +3
-3@@ -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 */
PATCH 1/1 libltpnuma: Fix compilation with libnuma v1
In reply to Cyril Hrubis----- Original Message -----
Quoted 6 lines
With libnuma v1
HAVE_NUMA_His defined but $(NUMA_LIBS) is not, which leads to compilation failures on very very old distributions.Signed-off-by Cyril Hrubis <[email protected]>CC Petr Vorel <[email protected]>CC Jan Stancek <[email protected]>
ack
Quoted 148 lines
--- 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(-)libs/libltpnuma/tst_numa.c +2
-2@@ -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) {testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +3
-3@@ -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 */ testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +3
-4@@ -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 */ --2.19.2