diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 960e5c09337..f12a93cb543 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -130,7 +130,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, handle = dlopen(pathname, dlopenflags); if (handle == NULL) { - char *error = dlerror(); + const char *error = dlerror(); if (error == NULL) error = "unknown dlopen() error"; PyErr_SetString(PyExc_ImportError, error);