This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] Fix android build.
- From: Ilya Tocar <tocarip dot intel at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Feb 2015 13:59:25 +0300
- Subject: [Patch] Fix android build.
- Authentication-results: sourceware.org; auth=none
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) \
--
1.8.3.1