aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-03-22 00:42:33 +0000
committerGuy Harris <guy@alum.mit.edu>2009-03-22 00:42:33 +0000
commit7c6e2155cc01e650987e3adc5529d16c27ad5816 (patch)
tree482edf3d6252f8d9a398a01dc3838029585feb4f /rawshark.c
parent724cae360eb251188c35adb420cdf1311fe426f4 (diff)
Attempt to use dladdr() to get the pathname of the executable image if
it's available and works. svn path=/trunk/; revision=27812
Diffstat (limited to 'rawshark.c')
-rw-r--r--rawshark.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rawshark.c b/rawshark.c
index 9dc10bcb7b..5b3d07af23 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -31,7 +31,7 @@
* - Opens a specified file or named pipe
* - Applies a specfied DLT or "decode as" encapsulation
* - Reads frames prepended with a libpcap packet header.
- * - Prints a status line, followed by fields from a specified list.
+ * - Prints a status line, followed by fields from a specified list.
*/
#ifdef HAVE_CONFIG_H
@@ -460,7 +460,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, "rawshark: Can't get pathname of rawshark program: %s.\n",
init_progfile_dir_error);