fix format string for 64-bit time_t, found by clang warning

This commit is contained in:
sthen 2017-05-06 22:00:53 +00:00
parent 044a3c1586
commit 64ce11935f
2 changed files with 28 additions and 14 deletions

View File

@ -1,16 +1,17 @@
# $OpenBSD: Makefile,v 1.61 2017/04/18 21:05:09 sthen Exp $
# $OpenBSD: Makefile,v 1.62 2017/05/06 22:00:53 sthen Exp $
COMMENT= MS-DOS Telix-like serial communication program
COMMENT= MS-DOS Telix-like serial communication program
DISTNAME= minicom-2.7.1
CATEGORIES= comms
MASTER_SITES= https://www.alioth.debian.org/frs/download.php/latestfile/3/
DISTNAME= minicom-2.7.1
REVISION= 0
CATEGORIES= comms
MASTER_SITES= https://www.alioth.debian.org/frs/download.php/latestfile/3/
HOMEPAGE= http://alioth.debian.org/projects/minicom/
HOMEPAGE= http://alioth.debian.org/projects/minicom/
LIB_DEPENDS= devel/gettext
RUN_DEPENDS= comms/kermit \
comms/lrzsz
LIB_DEPENDS= devel/gettext
RUN_DEPENDS= comms/kermit \
comms/lrzsz
# GPL
PERMIT_PACKAGE_CDROM= Yes

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_main_c,v 1.6 2017/05/06 21:57:27 sthen Exp $
$OpenBSD: patch-src_main_c,v 1.7 2017/05/06 22:00:53 sthen Exp $
Index: src/main.c
--- src/main.c.orig
@ -13,11 +13,10 @@ Index: src/main.c
#include "port.h"
#include "minicom.h"
#include "intl.h"
@@ -332,6 +335,17 @@ nolock:
@@ -333,6 +336,17 @@ nolock:
/* Set CLOCAL mode */
m_nohang(portfd);
+
+ /* maybe, just maybe, we're looking at a GPS */
+ do {
+ int nmeadisc = NMEADISC;
@ -28,6 +27,20 @@ Index: src/main.c
+ ioctl(portfd, TIOCSETD, &nmeadisc);
+ ioctl(portfd, TIOCSTSTAMP, &tstamps);
+ } while (0);
+
/* Set Hangup on Close if program crashes. (Hehe) */
m_hupcl(portfd, 1);
if (doinit > 0)
@@ -553,9 +567,10 @@ static void show_status_fmt(const char *fmt)
bufi += snprintf(buf + bufi, COLS - bufi, "%s",
P_HASDCD[0] == 'Y' ? _("Offline") : _("OFFLINE"));
else
- bufi += snprintf(buf + bufi, COLS - bufi, "%s %ld:%ld",
+ bufi += snprintf(buf + bufi, COLS - bufi, "%s %lld:%lld",
P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
- online / 3600, (online / 60) % 60);
+ (long long)(online / 3600),
+ (long long)(online / 60) % 60);
break;
case 'D':