summaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax
diff options
context:
space:
mode:
authoris <is@pkgsrc.org>2015-08-21 11:08:36 +0000
committeris <is@pkgsrc.org>2015-08-21 11:08:36 +0000
commitfea7bff0d60e22d587e15666a88b01ff2fb5182b (patch)
tree5b84c80a5a3daa3a3040ecba161e73a001184e11 /comms/mgetty+sendfax
parent4c2216cc28825959015cbf808ed687fb8733b25f (diff)
downloadpkgsrc-fea7bff0d60e22d587e15666a88b01ff2fb5182b.tar.gz
There were a few places where time_t was passed to printf-like functions,
but the format string specifies %d. As all of them are time differences, and a fax transmission shouldn't need more than 2^31 (normally not even 2^15) seconds, cast to (int), like already in a few other places. Needed because sizeof(time_t) > sizeof(int) in NetBSD-6 and later.
Diffstat (limited to 'comms/mgetty+sendfax')
-rw-r--r--comms/mgetty+sendfax/Makefile4
-rw-r--r--comms/mgetty+sendfax/distinfo7
-rw-r--r--comms/mgetty+sendfax/patches/patch-faxrec.c13
-rw-r--r--comms/mgetty+sendfax/patches/patch-sendfax.c49
4 files changed, 66 insertions, 7 deletions
diff --git a/comms/mgetty+sendfax/Makefile b/comms/mgetty+sendfax/Makefile
index b4f0ee05cb3..86bcd969ae9 100644
--- a/comms/mgetty+sendfax/Makefile
+++ b/comms/mgetty+sendfax/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.93 2015/08/21 11:03:43 is Exp $
+# $NetBSD: Makefile,v 1.94 2015/08/21 11:08:36 is Exp $
DISTNAME= mgetty1.1.37-Jun05
PKGNAME= mgetty-1.1.37
-PKGREVISION= 14
+PKGREVISION= 15
CATEGORIES= comms
MASTER_SITES= ftp://alpha.greenie.net/pub/mgetty/source/1.1/
diff --git a/comms/mgetty+sendfax/distinfo b/comms/mgetty+sendfax/distinfo
index bc33de055ff..17e4ceecd67 100644
--- a/comms/mgetty+sendfax/distinfo
+++ b/comms/mgetty+sendfax/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2013/03/28 21:17:56 joerg Exp $
+$NetBSD: distinfo,v 1.39 2015/08/21 11:08:36 is Exp $
SHA1 (mgetty1.1.37-Jun05.tar.gz) = fec9672e8be29a41f1392c6bf90c0d5732cdb2c2
RMD160 (mgetty1.1.37-Jun05.tar.gz) = 56aa9e213e4bd79c13ace2b7222253d91e756865
@@ -10,7 +10,7 @@ SHA1 (patch-ad) = f02a92a3a9a46fe71d7541897da24470e38f68c7
SHA1 (patch-af) = 088be22c69f39ca099cbe497b7e845bf103bf1c7
SHA1 (patch-ag) = f12e39005c78a94f641ccbdbbfa51b5181821148
SHA1 (patch-ah) = 0a3e5b1375eb36610e6a97113a8e535bf2fd1c6b
-SHA1 (patch-ai) = 0c3a6e5d067ff360789264f8be89710907f54403
+SHA1 (patch-ai) = fad1cd82ceb3b02a3c1fd0f2b2fd8ea62e78c282
SHA1 (patch-aj) = 37d88c1a4f8d5826f7113dd120c32e89cc442e5d
SHA1 (patch-ak) = 18f9570f35909089a4083fa24903dfea14dcc475
SHA1 (patch-al) = 56c9e0ab12ece94e9f17a5770f30b3e46e074361
@@ -20,7 +20,8 @@ SHA1 (patch-aq) = 160e94001568a0a4025a0d26140f972ec0ed8648
SHA1 (patch-ar) = 313f76a5d989c4511935d6fdc2ea2aadcbed76a0
SHA1 (patch-as) = 85bcf39cf5323625bb71f1659413e87864c824cf
SHA1 (patch-fax_Makefile) = 4d4043d84dafe5993d546518b698b10af48f126a
-SHA1 (patch-faxrec.c) = 8ce3b830140a77ad5880e455b442588fea8c3a2c
+SHA1 (patch-faxrec.c) = 1619e26695f37575c52b412d8cce74d67604bf52
SHA1 (patch-g3_g3cat.c) = 139e200b12ba8a1a1e946ec6fae8ccda3dbb3a26
SHA1 (patch-g3_pbm2g3.c) = c4346b470b3aa492e236f06350859c2854d40b3f
SHA1 (patch-login.c) = 17aa1b49b0e162cdc76d7cf53003578e2ddb1ca6
+SHA1 (patch-sendfax.c) = cceb410716f5241b1d6b331a54652255b95caa67
diff --git a/comms/mgetty+sendfax/patches/patch-faxrec.c b/comms/mgetty+sendfax/patches/patch-faxrec.c
index d93eea59883..204c272b93b 100644
--- a/comms/mgetty+sendfax/patches/patch-faxrec.c
+++ b/comms/mgetty+sendfax/patches/patch-faxrec.c
@@ -1,6 +1,6 @@
-$NetBSD: patch-faxrec.c,v 1.1 2013/03/28 21:17:57 joerg Exp $
+$NetBSD: patch-faxrec.c,v 1.2 2015/08/21 11:08:36 is Exp $
---- faxrec.c.orig 2013-03-28 20:03:52.000000000 +0000
+--- faxrec.c.orig 2006-01-01 17:13:18.000000000 +0000
+++ faxrec.c
@@ -22,6 +22,10 @@
#include <sys/times.h>
@@ -13,3 +13,12 @@ $NetBSD: patch-faxrec.c,v 1.1 2013/03/28 21:17:57 joerg Exp $
#ifndef sunos4
#include <sys/ioctl.h>
#endif
+@@ -178,7 +182,7 @@ int pagenum = 0, ppagenum = 0; /* pages
+ "fax dev=%s, pid=%d, caller='%s', name='%s', id='%s', +FHNG=%03d, pages=%d/%d, time=%02d:%02d:%02d\n",
+ Device, getpid(), CallerId, CallName, fax_remote_id,
+ fax_hangup_code, pagenum, ppagenum,
+- call_done / 3600, (call_done / 60) % 60, call_done % 60);
++ (int)(call_done / 3600), (int)(call_done / 60) % 60, (int)(call_done % 60));
+ }
+
+ void fax_notify_mail _P3( (pagenum, ppagenum, mail_to),
diff --git a/comms/mgetty+sendfax/patches/patch-sendfax.c b/comms/mgetty+sendfax/patches/patch-sendfax.c
new file mode 100644
index 00000000000..f6caa5abbaf
--- /dev/null
+++ b/comms/mgetty+sendfax/patches/patch-sendfax.c
@@ -0,0 +1,49 @@
+$NetBSD: patch-sendfax.c,v 1.1 2015/08/21 11:08:36 is Exp $
+
+--- sendfax.c.orig 2009-03-19 15:13:43.000000000 +0000
++++ sendfax.c
+@@ -100,7 +100,7 @@ RETSIGTYPE fax_sig_goodbye _P1( (signo),
+ lprintf( L_AUDIT,
+ "failed: got signal %d, pid=%d, dev=%s, time=%ds, acct=\"%s\"",
+ signo, getpid(), Device,
+- ( time(NULL)-call_start ), c_string(acct_handle));
++ (int)( time(NULL)-call_start ), c_string(acct_handle));
+ rmlocks();
+ exit(15); /* will close the fax device */
+ }
+@@ -560,7 +560,7 @@ int main _P2( (argc, argv),
+ {
+ lprintf( L_AUDIT, "failed dialing, phone=\"%s\", +FHS:%02d, dev=%s, time=%ds, acct=\"%s\"",
+ fac_tel_no, fax_hangup_code, Device,
+- ( time(NULL)-call_start ), c_string(acct_handle) );
++ (int)( time(NULL)-call_start ), c_string(acct_handle) );
+
+ /* certain combinations of ISDN modems and PABXes have funny
+ * failure modes - dial #1, NO CARRIER, dial #2, connect to #1 (!),
+@@ -748,7 +748,7 @@ int main _P2( (argc, argv),
+ {
+ lprintf( L_AUDIT, "failed transmitting %s: phone=\"%s\", +FHS:%02d, dev=%s, time=%ds, pages=%d/%d(+%d), bytes=%d, acct=\"%s\"",
+ argv[argidx], fac_tel_no, fax_hangup_code, Device,
+- ( time(NULL)-call_start ),
++ (int)( time(NULL)-call_start ),
+ total_pages-(argc-argidx)+1,
+ total_pages, total_resent, total_bytes,
+ c_string(acct_handle) );
+@@ -798,7 +798,7 @@ int main _P2( (argc, argv),
+ fprintf( stderr, "warning: polling failed\n" );
+ lprintf( L_AUDIT, "failed: polling failed, phone=\"%s\", +FHS:%02d, dev=%s, time=%ds, acct=\"%s\"",
+ fac_tel_no, fax_hangup_code, Device,
+- ( time(NULL)-call_start ), c_string(acct_handle) );
++ (int)( time(NULL)-call_start ), c_string(acct_handle) );
+ fax_close( fd );
+ exit(12);
+ }
+@@ -809,7 +809,7 @@ int main _P2( (argc, argv),
+ fax_close( fd );
+
+ lprintf( L_AUDIT, "success, phone=\"%s\", dev=%s, time=%ds, pages=%d(+%d), bytes=%d, acct=\"%s\"",
+- fac_tel_no, Device, ( time(NULL)-call_start ),
++ fac_tel_no, Device, (int)( time(NULL)-call_start ),
+ total_pages, total_resent, total_bytes,
+ c_string(acct_handle) );
+ return 0;