summaryrefslogtreecommitdiff
path: root/dso/unix/dso.c
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-09-13 04:59:52 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-09-13 04:59:52 +0000
commit23272b90cf5585232b919426031530d064b6620a (patch)
tree7af12e85e5c8ff68a07da26afe14d489d1499d4f /dso/unix/dso.c
parent446cd0cc2dfb76f1e563d6a03747986ece191f41 (diff)
downloadlibapr-23272b90cf5585232b919426031530d064b6620a.tar.gz
When encountering a link error when loading a DSO on Darwin, print the error.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso/unix/dso.c')
-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