public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29
Date: Fri, 14 Dec 2018 14:53:16 -0800	[thread overview]
Message-ID: <20181214225316.43732-1-raj.khem@gmail.com> (raw)

glibc has added getcpu() API starting with glibc 2.29 release, this
makes the static function in conflict and signatures are not same as
well.

Renaming helps to keep ltp build going

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/getcpu/getcpu01.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
index c927512ca..e850fe844 100644
--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
@@ -82,7 +82,7 @@ int sys_support = 0;
 
 void cleanup(void);
 void setup(void);
-static inline int getcpu(unsigned int *, unsigned int *, void *);
+static inline int get_cpu(unsigned int *, unsigned int *, void *);
 unsigned int set_cpu_affinity(void);
 unsigned int get_nodeid(unsigned int);
 unsigned int max_cpuid(size_t, cpu_set_t *);
@@ -124,7 +124,7 @@ int main(int ac, char **av)
 #ifdef __i386__
 		node_set = get_nodeid(cpu_set);
 #endif
-		TEST(getcpu(&cpu_id, &node_id, NULL));
+		TEST(get_cpu(&cpu_id, &node_id, NULL));
 		if (TEST_RETURN == 0) {
 			if (cpu_id != cpu_set) {
 				tst_resm(TFAIL, "getcpu() returned wrong value"
@@ -157,10 +157,10 @@ int main(int ac, char **av)
 }
 
 /*
- * getcpu() - calls the system call
+ * get_cpu() - calls the system call
  */
-static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
-			 void *cache_struct)
+static inline int get_cpu(unsigned *cpu_id, unsigned *node_id,
+			  void *cache_struct)
 {
 #if defined(__i386__)
 	return syscall(318, cpu_id, node_id, cache_struct);
-- 
2.20.0


             reply	other threads:[~2018-12-14 22:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 22:53 Khem Raj [this message]
2018-12-19 14:26 ` [LTP] [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29 Petr Vorel

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=20181214225316.43732-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.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