From patchwork Fri Dec 14 22:53:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 153914 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2626056ljp; Fri, 14 Dec 2018 14:53:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/URUSKfCS6of+mdBKKfpNDxTkIQDn8wPnzJpm/PUh7rx54CwhP1g7b9gjAo/pco6DEb5lO9 X-Received: by 2002:a1c:c2d4:: with SMTP id s203mr4633010wmf.3.1544828013042; Fri, 14 Dec 2018 14:53:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544828013; cv=none; d=google.com; s=arc-20160816; b=FyVGvsUISV8xAPJi81QuH/c+i9VbiWI8c2x4n9JeJGtUWuGxJ5wakoChyV7kx6LYiX UcwknNJAH4U4AOoJB30kWOWRb2gAnKVFiZc/JzoUcjVuTI5Dd/GhuHAOwdPFmQGafAYV UDCCjd2w4EbvThnUbT2x3MO8Ep9bbg7WpLkqrT3lBJRjALnx7DWrEGIwduhpjcmCXPnw zLMVdBjHhCVzGhIP0dhAGz50art/v+1WKmgYSqK0RQCPG8oYEj4ybq6t3+A5vf/zmDWw R6syL08ISxPaDQmxuwDnOn9Uwa6BqUoiDsER8AGnwWecODqCv86hqphAfF6O8DbtEkvR jL+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=7+wII9A0gwvNSDz/kMnGcn4UtUPrguipQaPNVq6vaeo=; b=XO//5mCJqVWlht5VVRcUWfVHopAxYI75VsM54mLcf8vrv8G8E+Gw8B+dE74/EGYLdf svmA2vMGh/bJ708osoY9BiXXDZturu1jaaKFx1lWFkh51tzo7b94ty/IJjOE65Lkip0N RJ52i94Qd12y2mYC4sJyR8crDMKTZ/0FSr8foZMpUGowOJAdVppEXlRnDoc+vIMyNBXn CaR2/cY8krp4UYfesKDA0/JPZ2j1jhX6HFl+5opzPgw9HG6ZvIT89xd4PrS/630Lez1u +qJCCFvwESQnjLSN/hKq9EqsKseWda4TRH3j6fguQSS9HHk7dMsl476cztY2M32ByJm3 HxqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=otbUFubi; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id b131si4080156wmg.4.2018.12.14.14.53.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 14:53:33 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=otbUFubi; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4A25E3E74AE for ; Fri, 14 Dec 2018 23:53:32 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) by picard.linux.it (Postfix) with ESMTP id 951413E70A5 for ; Fri, 14 Dec 2018 23:53:28 +0100 (CET) Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id D44D410005B4 for ; Fri, 14 Dec 2018 23:53:27 +0100 (CET) Received: by mail-pg1-x544.google.com with SMTP id d72so3318300pga.9 for ; Fri, 14 Dec 2018 14:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NtA2hBAHFhHkv/6tXd9kBuYdGMfOHiQuCOxsv9d3XD0=; b=otbUFubi3pA6QrFQd+n3A8xa6BBCO2veatJSb+dfvpyuNKwPK8dR4shHKzZ0YtvbUC B4/Q8h4VQxsgoPiHXkqXJCgEXn1sFHto4ABEqGqpWPp+SH7zKDyTlHBBDjpjAdIsen4d U1s29N6hojboAfuMWqvT/DnX5fBIhrKGZjAuMEKUEeSGPRC//9Jov1IVZ0JL5HihIph5 RKLgDgRKBUE47UEZRraVYyWW9ylYYAIDo7DtFttMdOM5J1odZTtDnDqRkb3cbvI5FWrj ZoVxm4DqkBN2NIoxS6jUN8ow1Znmb6glbqkYrrk2VNatbaA0ZB/UTmCODN3agGPi7x9g efRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NtA2hBAHFhHkv/6tXd9kBuYdGMfOHiQuCOxsv9d3XD0=; b=PAMFjl4OqY/jYVuun+DeP3FJ9qYgr+LZ3J4nm7lPQPgVWFEa4LGmFitpK4a5ddlwng rOv72zVw+xjAjqLSeuoTyg6FbiHjIDqT0xoPvhx9oB5Xgq14ksl/jEsUXNq0J1PIw11B /SgfIMOKZjJeY3hU1WDPpovakErFnoy8cYX9V2a/GHpLMa2dyyxOzY9HzWRaxytV477l 57hDrA7jQPVG6sOV6GzFC6k3FdMqR/NfVbEPUmXJmZwLqCdwyOO7VwsFfbVu71FafQeh xcWcb5ePGzypZyy+Bau0NfKXqtk4526h6Yukt3MRHCbO2MYsyJrpm9axw/OjGMUkODG2 LfHQ== X-Gm-Message-State: AA+aEWYxVwnbt4KL/oQI1xJxhX+TXQC7B3To8uhi1Jez9HgM2KFGnabd HG+R4puz4MH64Xi1dVCGySbQus87Wrk= X-Received: by 2002:a62:e30d:: with SMTP id g13mr4502559pfh.151.1544828005556; Fri, 14 Dec 2018 14:53:25 -0800 (PST) Received: from localhost.localdomain ([2601:646:877f:9499::6872]) by smtp.gmail.com with ESMTPSA id j9sm7215161pfi.86.2018.12.14.14.53.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 14:53:24 -0800 (PST) From: Khem Raj To: ltp@lists.linux.it Date: Fri, 14 Dec 2018 14:53:16 -0800 Message-Id: <20181214225316.43732-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29 X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+patch=linaro.org@lists.linux.it Sender: "ltp" 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 --- 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);