summaryrefslogtreecommitdiff
path: root/dso/unix
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2002-09-13 04:59:52 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2002-09-13 04:59:52 +0000
commite5964fe53cf6eeeae2afa4e8daf1ae52859088a2 (patch)
tree7af12e85e5c8ff68a07da26afe14d489d1499d4f /dso/unix
parent5813a8501182dc9dea393668c046b7c356aa8853 (diff)
downloadapr-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/unix')
-rw-r--r--dso/unix/dso.c9
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