From patchwork Tue Nov 12 11:50:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: oscar.mateo@intel.com X-Patchwork-Id: 3171651 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7527DC045B for ; Tue, 12 Nov 2013 10:54:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A3A82039A for ; Tue, 12 Nov 2013 10:54:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D5F022024D for ; Tue, 12 Nov 2013 10:54:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 59364FA965; Tue, 12 Nov 2013 02:54:43 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 18DBDFA945 for ; Tue, 12 Nov 2013 02:54:19 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Nov 2013 02:54:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,535,1378882800"; d="scan'208";a="433802993" Received: from omateolo-linux2.isw.intel.com ([10.102.226.43]) by orsmga002.jf.intel.com with ESMTP; 12 Nov 2013 02:54:17 -0800 From: oscar.mateo@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Nov 2013 11:50:43 +0000 Message-Id: <1384257045-15524-10-git-send-email-oscar.mateo@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> References: <1384257045-15524-1-git-send-email-oscar.mateo@intel.com> Subject: [Intel-gfx] [PATCH v2 09/11] lib/drmtest: Get the correct basename() under Android X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Mateo Signed-off-by: Oscar Mateo --- lib/drmtest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 44fd30e..75f49cd 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -26,7 +26,11 @@ * */ +#ifndef ANDROID #define _GNU_SOURCE +#else +#include +#endif #include #include #include @@ -1007,7 +1011,7 @@ static bool run_under_gdb(void) sprintf(buf, "/proc/%d/exe", getppid()); return (readlink (buf, buf, sizeof (buf)) != -1 && - strncmp (basename (buf), "gdb", 3) == 0); + strncmp(basename(buf), "gdb", 3) == 0); } void __igt_fail_assert(int exitcode, const char *file,