Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix so logrotate compiles on SmartOS again #470

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sysutils/logrotate/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Size (ca742b9dd72b7815e87cb53331f08d46fe21d86c.tar.gz) = 78769 bytes
SHA1 (patch-examples_logrotate-default) = 57fc602caa5eeaa830f5d2dc0667e11330bcd1e8
SHA1 (patch-examples_logrotate.cron) = 02981cb2b49e3f3f500fcb3db9b5dcb5fe62bddc
SHA1 (patch-logrotate.8) = 0bf7d9cfbc2f5dfff42a82b523926b9c8d0362a0
SHA1 (patch-logrotate.c) = b469438fb1198bcec426f215427449b7ea255586
26 changes: 26 additions & 0 deletions sysutils/logrotate/patches/patch-logrotate.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$NetBSD$

Fixes GCC error:
"error: missing sentinel in function call [-Werror=format=]"


--- logrotate.c.orig 2016-08-03 09:01:44.000000000 +0000
+++ logrotate.c
@@ -352,7 +352,7 @@ static int runScript(struct logInfo *log
DOEXIT(1);
}
}
- execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, NULL);
+ execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, (char *)NULL);
DOEXIT(1);
}

@@ -672,7 +672,7 @@ static int mailLog(struct logInfo *log,
DOEXIT(1);
}

- execlp(uncompressCommand, uncompressCommand, NULL);
+ execlp(uncompressCommand, uncompressCommand, (char *)NULL);
DOEXIT(1);
}