Date: Sat, 17 May 2014 18:59:56 GMT From: Peter Losher <plosher@freebsd.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/189895: Update mail/dma to build under 8.x (8.4) Message-ID: <201405171859.s4HIxuqt056010@cgiserv.freebsd.org> Resent-Message-ID: <201405171910.s4HJA0YL045572@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 189895 >Category: ports >Synopsis: Update mail/dma to build under 8.x (8.4) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 17 19:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Peter Losher >Release: 8.4-RELEASE >Organization: >Environment: >Description: >How-To-Repeat: cd /usr/ports/mail/dma under a 8.x box and watch it blow... [...] /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//spool.c: In function 'flushqueue_since': /usr/ports/mail/dma/work/corecode-dma-2bb8bcb/dma/..//spool.c:419: error: 'struct stat' has no member named 'st_mtim' >Fix: See attached patches - moved the existing spool.c patch to it's own conditional and added one for 8.x systems. Patch attached with submission follows: diff -ruN /usr/ports/mail/dma/Makefile /home/plosher/dma/Makefile --- /usr/ports/mail/dma/Makefile 2013-09-22 14:36:55.000000000 +0000 +++ /home/plosher/dma/Makefile 2014-05-17 18:43:30.000000000 +0000 @@ -37,7 +37,9 @@ .include <bsd.port.pre.mk> .if ${OSVERSION} < 900000 -IGNORE= Does not build in 8.x +EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-8-spool.c +.else +EXTRA_PATCHES= ${.CURDIR:H:H}/mail/dma/files/extrapatch-else-spool.c .endif pre-patch: diff -ruN /usr/ports/mail/dma/files/extrapatch-8-spool.c /home/plosher/dma/files/extrapatch-8-spool.c --- /usr/ports/mail/dma/files/extrapatch-8-spool.c 1970-01-01 00:00:00.000000000 +0000 +++ /home/plosher/dma/files/extrapatch-8-spool.c 2014-05-17 18:43:30.000000000 +0000 @@ -0,0 +1,19 @@ +--- spool.c 2013-06-03 14:03:15.000000000 +0000 ++++ spool.c.8 2014-05-17 18:14:45.000000000 +0000 +@@ -36,6 +36,7 @@ + + #include <sys/file.h> + #include <sys/stat.h> ++#include <sys/time.h> + + #include <ctype.h> + #include <dirent.h> +@@ -415,7 +416,7 @@ + return (0); + + /* Did the flush file get touched within the last period seconds? */ +- if (st.st_mtim.tv_sec + period >= now.tv_sec) ++ if (st.st_mtime + (int)period >= now.tv_sec) + return (1); + else + return (0); diff -ruN /usr/ports/mail/dma/files/extrapatch-else-spool.c /home/plosher/dma/files/extrapatch-else-spool.c --- /usr/ports/mail/dma/files/extrapatch-else-spool.c 1970-01-01 00:00:00.000000000 +0000 +++ /home/plosher/dma/files/extrapatch-else-spool.c 2014-05-17 18:43:30.000000000 +0000 @@ -0,0 +1,11 @@ +--- spool.c.orig 2013-06-03 14:03:15.000000000 +0000 ++++ spool.c 2013-08-22 11:07:47.000000000 +0000 +@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period) + return (0); + + /* Did the flush file get touched within the last period seconds? */ +- if (st.st_mtim.tv_sec + period >= now.tv_sec) ++ if (st.st_mtim.tv_sec + (int)period >= now.tv_sec) + return (1); + else + return (0); diff -ruN /usr/ports/mail/dma/files/patch-spool.c /home/plosher/dma/files/patch-spool.c --- /usr/ports/mail/dma/files/patch-spool.c 2014-01-22 17:40:44.000000000 +0000 +++ /home/plosher/dma/files/patch-spool.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- spool.c.orig 2013-06-03 14:03:15.000000000 +0000 -+++ spool.c 2013-08-22 11:07:47.000000000 +0000 -@@ -415,7 +415,7 @@ flushqueue_since(unsigned int period) - return (0); - - /* Did the flush file get touched within the last period seconds? */ -- if (st.st_mtim.tv_sec + period >= now.tv_sec) -+ if (st.st_mtim.tv_sec + (int)period >= now.tv_sec) - return (1); - else - return (0); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405171859.s4HIxuqt056010>