compilation fix by Bernhard Fischer <rep.nop@aon.at>
This commit is contained in:
parent
d1e54e4f56
commit
db1edde6d8
@ -290,7 +290,9 @@ static void log_locally(char *msg)
|
|||||||
goto reopen;
|
goto reopen;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#if ENABLE_FEATURE_ROTATE_LOGFILE
|
||||||
struct stat statf;
|
struct stat statf;
|
||||||
|
#endif
|
||||||
reopen:
|
reopen:
|
||||||
logFD = device_open(logFilePath, O_WRONLY | O_CREAT
|
logFD = device_open(logFilePath, O_WRONLY | O_CREAT
|
||||||
| O_NOCTTY | O_APPEND | O_NONBLOCK);
|
| O_NOCTTY | O_APPEND | O_NONBLOCK);
|
||||||
@ -340,8 +342,9 @@ static void log_locally(char *msg)
|
|||||||
}
|
}
|
||||||
ftruncate(logFD, 0);
|
ftruncate(logFD, 0);
|
||||||
}
|
}
|
||||||
|
curFileSize +=
|
||||||
#endif
|
#endif
|
||||||
curFileSize += full_write(logFD, msg, len);
|
full_write(logFD, msg, len);
|
||||||
fl.l_type = F_UNLCK;
|
fl.l_type = F_UNLCK;
|
||||||
fcntl(logFD, F_SETLKW, &fl);
|
fcntl(logFD, F_SETLKW, &fl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user