From 7c6e2155cc01e650987e3adc5529d16c27ad5816 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 22 Mar 2009 00:42:33 +0000 Subject: Attempt to use dladdr() to get the pathname of the executable image if it's available and works. svn path=/trunk/; revision=27812 --- dftest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dftest.c') diff --git a/dftest.c b/dftest.c index 84b198cbde..7fbadd8bc7 100644 --- a/dftest.c +++ b/dftest.c @@ -75,7 +75,8 @@ main(int argc, char **argv) /* * Attempt to get the pathname of the executable file. */ - init_progfile_dir_error = init_progfile_dir(argv[0]); + init_progfile_dir_error = init_progfile_dir(argv[0], + (const void *)main); if (init_progfile_dir_error != NULL) { fprintf(stderr, "dftest: Can't get pathname of dftest program: %s.\n", init_progfile_dir_error); -- cgit v1.2.1