Permalink
Browse files

logrotate: add patch for timer problem

Patch by @Schamschula to address problem on 10.13 with hi-res timing

Fixes:  https://trac.macports.org/ticket/58045
  • Loading branch information...
ctreleaven committed Feb 10, 2019
1 parent 447d90d commit b391c4e3794b9681660e4aa44cfa6c48b6e66575
Showing with 14 additions and 0 deletions.
  1. +3 −0 sysutils/logrotate/Portfile
  2. +11 −0 sysutils/logrotate/files/patch-logrotate.c.diff
@@ -4,6 +4,7 @@ PortSystem 1.0
PortGroup github 1.0

github.setup logrotate logrotate 3.15.0
revision 1

github.tarball_from releases
use_xz yes
@@ -40,6 +41,8 @@ post-extract {
${worksrcpath}/
}

patchfiles patch-logrotate.c.diff

post-patch {
reinplace "s|@PREFIX@|${prefix}|g" \
${worksrcpath}/examples/logrotate.conf
@@ -0,0 +1,11 @@
--- logrotate.c.orig 2019-02-10 05:18:49.000000000 -0600
+++ logrotate.c 2019-02-10 05:19:17.000000000 -0600
@@ -688,7 +688,7 @@
/* If we can't change atime/mtime, it's not a disaster. It might
possibly fail under SELinux. But do try to preserve the
fractional part if we have utimensat(). */
-#ifdef HAVE_UTIMENSAT
+#if defined HAVE_UTIMENSAT && !defined(__APPLE__)
struct timespec ts[2];

ts[0] = sb->st_atim;

0 comments on commit b391c4e

Please sign in to comment.