aboutsummaryrefslogtreecommitdiffstats
path: root/epan/filesystem.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-03-22 06:53:17 +0000
committerGuy Harris <guy@alum.mit.edu>2009-03-22 06:53:17 +0000
commitc73ab7dff78656b8cdc261f3527ed5839a2543ba (patch)
tree60941273e6ca21e71eb87fc65dd9bade75474113 /epan/filesystem.c
parent6f059e8cb7877efe7c87bbd3c6ee3b6737db950f (diff)
Change the signature of init_progfile_dir() so the casting of the
function pointer (to main) to an argument to dladdr() is done in init_progfile_dir() rather than its callers. svn path=/trunk/; revision=27814
Diffstat (limited to 'epan/filesystem.c')
-rw-r--r--epan/filesystem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index dbf5e04f71..7b1fb617b2 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -249,7 +249,7 @@ init_progfile_dir(const char *arg0
#ifdef _WIN32
_U_
#endif
-, void *main_addr
+, int (*main_addr)(int, char **)
#if defined(_WIN32) || !defined(DLADDR_FINDS_EXECUTABLE_PATH)
_U_
#endif
@@ -369,7 +369,7 @@ init_progfile_dir(const char *arg0
/*
* Try to use dladdr() to find the pathname of the executable.
*/
- if (dladdr(main_addr, &info) && info.dli_fname[0] == '/') {
+ if (dladdr((void *)main_addr, &info) && info.dli_fname[0] == '/') {
/*
* dladdr() succeeded, and we got an absolute path
* for the module containing main() (I don't know