From patchwork Wed Feb 18 10:59:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Tocar X-Patchwork-Id: 440904 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 290B614016A for ; Wed, 18 Feb 2015 21:59:49 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=sVfrKsjYiIiEPIaA/N+H3u0DJwGTbTLc/ev256mZct3ZlTgiv0 Rk1h46pa5VZIVyoqcD8C8Isi7JYW1F7xAK4PNFOAkWImLPkvxqorE42AN4vhhPXN gtp5ouMynz2oGIqcjmQbd1V2UVZxipHvDpmOSwR/e1LA5dKCMn2iGe+Uk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=dZ2ctqrHwynL+ConXRetXtHlnPg=; b=b/MgdOh2coswyykAgmkM Sqip+GDUjRk+17lUfxBcMsW5yAL0C8AY/jiPdNydfwY46RDp83BTEYnAEQI/Nzsi 9nIJ3l0IXK6Q/AKwDlFR8UUdxMgIfJPriiYcAEr/i+l3JsUISeCVIf3Hj7wnIEwb UALq1A7qSw0LDXwFi/CLAE4= Received: (qmail 20781 invoked by alias); 18 Feb 2015 10:59:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 20754 invoked by uid 89); 18 Feb 2015 10:59:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_FROM_URIBL_PCCC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ig0-f171.google.com Received: from mail-ig0-f171.google.com (HELO mail-ig0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Feb 2015 10:59:40 +0000 Received: by mail-ig0-f171.google.com with SMTP id h15so35802188igd.4 for ; Wed, 18 Feb 2015 02:59:38 -0800 (PST) X-Received: by 10.107.157.195 with SMTP id g186mr19609579ioe.72.1424257177965; Wed, 18 Feb 2015 02:59:37 -0800 (PST) Received: from msticlxl7.ims.intel.com (jfdmzpr01-ext.jf.intel.com. [134.134.139.70]) by mx.google.com with ESMTPSA id m132sm7280573ioe.33.2015.02.18.02.59.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 02:59:37 -0800 (PST) Date: Wed, 18 Feb 2015 13:59:25 +0300 From: Ilya Tocar To: Jakub Jelinek Cc: GCC Patches Subject: [Patch] Fix android build. Message-ID: <20150218105925.GA9876@msticlxl7.ims.intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, On android dlerror returns const char*. Ok for trunk? libgomp/ * target.c (gomp_load_plugin_for_device): Fix type of dlerror return value. (DLSYM_OPT): Ditto. --- libgomp/target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgomp/target.c b/libgomp/target.c index 73e757a..50baa4d 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -919,7 +919,7 @@ static bool gomp_load_plugin_for_device (struct gomp_device_descr *device, const char *plugin_name) { - char *err = NULL, *last_missing = NULL; + const char *err = NULL, *last_missing = NULL; int optional_present, optional_total; /* Clear any existing error. */ @@ -947,7 +947,7 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device, #define DLSYM_OPT(f, n) \ do \ { \ - char *tmp_err; \ + const char *tmp_err; \ device->f##_func = dlsym (plugin_handle, "GOMP_OFFLOAD_" #n); \ tmp_err = dlerror (); \ if (tmp_err == NULL) \