diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-09-13 04:59:52 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-09-13 04:59:52 +0000 |
commit | e5964fe53cf6eeeae2afa4e8daf1ae52859088a2 (patch) | |
tree | 7af12e85e5c8ff68a07da26afe14d489d1499d4f /dso | |
parent | 5813a8501182dc9dea393668c046b7c356aa8853 (diff) | |
download | apr-e5964fe53cf6eeeae2afa4e8daf1ae52859088a2.tar.gz |
When encountering a link error when loading a DSO on Darwin, print the error.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r-- | dso/unix/dso.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c index 8f97b7555..9168920fd 100644 --- a/dso/unix/dso.c +++ b/dso/unix/dso.c @@ -125,7 +125,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, NSObjectFileImage image; NSModule os_handle = NULL; NSObjectFileImageReturnCode dsoerr; - char* err_msg = NULL; + const char* err_msg = NULL; dsoerr = NSCreateObjectFileImageFromFile(path, &image); if (dsoerr == NSObjectFileImageSuccess) { @@ -133,6 +133,13 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, os_handle = NSLinkModule(image, path, NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_NONE); + /* If something went wrong, get the errors... */ + if (!os_handle) { + NSLinkEditErrors errors; + int errorNumber; + const char *fileName; + NSLinkEditError(&errors, &errorNumber, &fileName, &err_msg); + } #else os_handle = NSLinkModule(image, path, FALSE); #endif |