Skip to content

Commit

Permalink
fix compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarbonneaux committed Apr 28, 2016
1 parent c57782b commit ab4f890
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion include/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
# include <login.h>
#endif

#ifdef HAVE_EXECINFO_H
# include <execinfo.h>
#endif

#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
Expand All @@ -99,12 +103,13 @@
# endif
#endif

void pr_log_stacktrace(module *module, int debuglevel, const char*file, int line);

int log_lastlog(uid_t uid, const char *user_name, const char *tty,
const pr_netaddr_t *remote_addr);
#endif /* PR_USE_LASTLOG */

void pr_log_stacktrace(module *module, int debuglevel, const char*file, int line);

/* Note: Like lastlog.h, it would be tempting to split out the declaration of
* this function, and its necessary system headers, into a proftpd-specific
* wtmp.h file. But that would collide with the system wtmp.h file on
Expand Down
2 changes: 1 addition & 1 deletion src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void pr_log_stacktrace(module *module, int debuglevel, const char*file, int line
char **strings;
int tracesz;

(void) pr_log_debug(debuglevel, "%s/%s: -----BEGIN STACK TRACE from %s/%d -----",module->name,module->module_version, function);
(void) pr_log_debug(debuglevel, "%s/%s: -----BEGIN STACK TRACE from %s/%d -----",module->name,module->module_version, file, line);

tracesz = backtrace(trace, PR_TUNABLE_CALLER_DEPTH);
if (tracesz < 0) {
Expand Down

0 comments on commit ab4f890

Please sign in to comment.