remove gratuitous C99-ism to allow building with gcc2
This commit is contained in:
parent
b64124b196
commit
fd16232a9e
@ -1,8 +1,9 @@
|
|||||||
# $OpenBSD: Makefile,v 1.9 2007/09/15 23:54:17 merdely Exp $
|
# $OpenBSD: Makefile,v 1.10 2009/03/23 17:42:40 naddy Exp $
|
||||||
|
|
||||||
COMMENT= tty recorder
|
COMMENT= tty recorder
|
||||||
|
|
||||||
DISTNAME= ttyrec-1.0.8
|
DISTNAME= ttyrec-1.0.8
|
||||||
|
PKGNAME= ${DISTNAME}p0
|
||||||
CATEGORIES= misc
|
CATEGORIES= misc
|
||||||
|
|
||||||
HOMEPAGE= http://0xcc.net/ttyrec/
|
HOMEPAGE= http://0xcc.net/ttyrec/
|
||||||
|
21
misc/ttyrec/patches/patch-ttyplay_c
Normal file
21
misc/ttyrec/patches/patch-ttyplay_c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
$OpenBSD: patch-ttyplay_c,v 1.1 2009/03/23 17:42:40 naddy Exp $
|
||||||
|
--- ttyplay.c.orig Mon Mar 23 11:32:09 2009
|
||||||
|
+++ ttyplay.c Mon Mar 23 11:32:52 2009
|
||||||
|
@@ -81,7 +81,7 @@ double
|
||||||
|
ttywait (struct timeval prev, struct timeval cur, double speed)
|
||||||
|
{
|
||||||
|
static struct timeval drift = {0, 0};
|
||||||
|
- struct timeval start;
|
||||||
|
+ struct timeval start, orig_diff;
|
||||||
|
struct timeval diff = timeval_diff(prev, cur);
|
||||||
|
fd_set readfs;
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ ttywait (struct timeval prev, struct timeval cur, doub
|
||||||
|
*
|
||||||
|
* Save "diff" since select(2) may overwrite it to {0, 0}.
|
||||||
|
*/
|
||||||
|
- struct timeval orig_diff = diff;
|
||||||
|
+ orig_diff = diff;
|
||||||
|
select(1, &readfs, NULL, NULL, &diff);
|
||||||
|
diff = orig_diff; /* Restore the original diff value. */
|
||||||
|
if (FD_ISSET(0, &readfs)) { /* a user hits a character? */
|
Loading…
Reference in New Issue
Block a user