diff options
author | gdt <gdt@pkgsrc.org> | 2018-07-14 15:03:57 +0000 |
---|---|---|
committer | gdt <gdt@pkgsrc.org> | 2018-07-14 15:03:57 +0000 |
commit | f59a1003d3638da5d83263b6ed07d574d362c12b (patch) | |
tree | 38f27d1c7904d1c4e3430b7c78eb72a82930d40a /security/zoneminder/patches/patch-src_zm__rtp__source.cpp | |
parent | 1fd0ed8742379f893d0213b0eaa25b29f2231647 (diff) | |
download | pkgsrc-f59a1003d3638da5d83263b6ed07d574d362c12b.tar.gz |
zoneminder: adjust fix for printf/time_t
Rather than casting to long, cast to intmax_t and print with %jd, as
suggested by joerg@.
Diffstat (limited to 'security/zoneminder/patches/patch-src_zm__rtp__source.cpp')
-rw-r--r-- | security/zoneminder/patches/patch-src_zm__rtp__source.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/zoneminder/patches/patch-src_zm__rtp__source.cpp b/security/zoneminder/patches/patch-src_zm__rtp__source.cpp index a86236a1f9d..d3075dcc328 100644 --- a/security/zoneminder/patches/patch-src_zm__rtp__source.cpp +++ b/security/zoneminder/patches/patch-src_zm__rtp__source.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-src_zm__rtp__source.cpp,v 1.1 2018/07/13 02:05:11 gdt Exp $ +$NetBSD: patch-src_zm__rtp__source.cpp,v 1.2 2018/07/14 15:03:57 gdt Exp $ --- src/zm_rtp_source.cpp.orig 2015-02-05 02:52:37.000000000 +0000 +++ src/zm_rtp_source.cpp @@ -7,7 +7,7 @@ $NetBSD: patch-src_zm__rtp__source.cpp,v 1.1 2018/07/13 02:05:11 gdt Exp $ struct timeval ntpTime = tvMake( ntpTimeSecs, suseconds_t((USEC_PER_SEC*(ntpTimeFrac>>16))/(1<<16)) ); - Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); -+ Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", (long) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); ++ Debug( 5, "ntpTime: %jd.%06ld, rtpTime: %x", (intmax_t) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); if ( mBaseTimeNtp.tv_sec == 0 ) { @@ -17,8 +17,8 @@ $NetBSD: patch-src_zm__rtp__source.cpp,v 1.1 2018/07/13 02:05:11 gdt Exp $ { - Debug( 5, "lastSrNtpTime: %ld.%06ld, rtpTime: %x", mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime ); - Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); -+ Debug( 5, "lastSrNtpTime: %ld.%06ld, rtpTime: %x", (long) mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime ); -+ Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", (long) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); ++ Debug( 5, "lastSrNtpTime: %jd.%06ld, rtpTime: %x", (intmax_t) mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime ); ++ Debug( 5, "ntpTime: %jd.%06ld, rtpTime: %x", (intmax_t) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime ); double diffNtpTime = tvDiffSec( mBaseTimeNtp, ntpTime ); uint32_t diffRtpTime = rtpTime - mBaseTimeRtp; |