$NetBSD: patch-sn__logfile_c,v 1.1 2012/03/31 08:31:06 dholland Exp $ - Use standard headers. - Call fchmod correctly. --- sn_logfile.c.orig 1997-04-18 09:33:58.000000000 +0000 +++ sn_logfile.c @@ -4,6 +4,8 @@ #include "sn_config.h" #include +#include +#include #include #include #include "sn_defines.h" @@ -81,7 +83,7 @@ LogFILE=fopen(Logfile,"a"); if(LogFILE==NULL) printf("Sniffit hardattack.. couldn't create/open logfile...\n"), exit(1); exit_func(logfile_exit); -fchmod(LogFILE, S_IWUSR|S_IRUSR); +fchmod(fileno(LogFILE), S_IWUSR|S_IRUSR); print_logline("Sniffit session started."); printf("Sniffit Logging started. (loglevel: %d)\n",LOGLEVEL); }