Cast the result of the operation to long, not the time(NULL) call.
On systems where sizeof(time_t) is other than long this will produce
a warning.
if (!Is_Daemon) {
/* log to console */
fprintf(stdout, "[%ld:%d %4ld] %s\n", (long)getpid(), Level,
if (!Is_Daemon) {
/* log to console */
fprintf(stdout, "[%ld:%d %4ld] %s\n", (long)getpid(), Level,
- (long)time(NULL) - NGIRCd_Start, msg);
+ (long)(time(NULL) - NGIRCd_Start), msg);
fflush(stdout);
}
#ifdef SYSLOG
fflush(stdout);
}
#ifdef SYSLOG