mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Fix build on -current
PR: 54613 Submitted by: krion Approved by: fjoe (mentor) (implicit) Maintainer timeout: one week
This commit is contained in:
parent
358875200d
commit
c08de74634
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=85906
2 changed files with 43 additions and 22 deletions
|
@ -1,22 +0,0 @@
|
|||
--- logrotate.c.orig Thu Jun 17 04:37:19 1999
|
||||
+++ logrotate.c Wed Dec 29 11:31:57 1999
|
||||
@@ -1,9 +1,7 @@
|
||||
-#include <alloca.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <getopt.h>
|
||||
#include <popt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -457,6 +455,9 @@
|
||||
hasErrors = 1;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ message(MESS_DEBUG, "sleep 10 to wait daemon close log\n");
|
||||
+ sleep(10);
|
||||
|
||||
if (!hasErrors && !log->rotateCount) {
|
||||
message(MESS_DEBUG, "removing rotated log (rotateCount == 0)");
|
43
sysutils/logrotate/files/patch-logrotate.c
Normal file
43
sysutils/logrotate/files/patch-logrotate.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
--- logrotate.c.orig Fri Aug 4 20:27:38 2000
|
||||
+++ logrotate.c Fri Jul 18 15:20:13 2003
|
||||
@@ -1,9 +1,7 @@
|
||||
-#include <alloca.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <getopt.h>
|
||||
#include <popt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -395,8 +393,7 @@
|
||||
if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
|
||||
message(MESS_DEBUG, "running prerotate script\n");
|
||||
if (runScript(log->files[logNum], log->pre)) {
|
||||
- fprintf(errorFile, "error running prerotate script --
|
||||
- leaving old log in place\n");
|
||||
+ fprintf(errorFile, "error running prerotate script -- leaving old log in place\n");
|
||||
hasErrors = 1;
|
||||
}
|
||||
}
|
||||
@@ -471,6 +468,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ message(MESS_DEBUG, "sleep 10 to wait daemon close log\n");
|
||||
+ sleep(10);
|
||||
+
|
||||
if (!hasErrors && !log->rotateCount) {
|
||||
message(MESS_DEBUG, "removing rotated log (rotateCount == 0)");
|
||||
if (unlink(finalName)) {
|
||||
@@ -634,8 +634,8 @@
|
||||
if (log->pre && (log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
|
||||
message(MESS_DEBUG, "running shared prerotate script\n");
|
||||
if (runScript(log->pattern, log->pre)) {
|
||||
- fprintf(errorFile, "error running shared prerotate script for %s--
|
||||
- leaving old logs in place\n", log->pattern);
|
||||
+ fprintf(errorFile, "error running shared prerotate script for %s-- "
|
||||
+ "leaving old logs in place\n", log->pattern);
|
||||
hasErrors = 1;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue