From b6bf33756b426420b6155d9644d192e6e57acd5f Mon Sep 17 00:00:00 2001 From: jperkin Date: Thu, 9 Jul 2015 09:44:18 +0000 Subject: Use nbcompat headers. Fix pid_t printing. Fixes build on at least SunOS. --- misc/autocue/files/autocue.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'misc') diff --git a/misc/autocue/files/autocue.c b/misc/autocue/files/autocue.c index cbb7ccbc995..9b7ea9bdf88 100644 --- a/misc/autocue/files/autocue.c +++ b/misc/autocue/files/autocue.c @@ -1,4 +1,4 @@ -/* $NetBSD: autocue.c,v 1.3 2007/02/24 12:16:12 agc Exp $ */ +/* $NetBSD: autocue.c,v 1.4 2015/07/09 09:44:18 jperkin Exp $ */ /* * Copyright © 2006 Alistair Crooks. All rights reserved. @@ -27,12 +27,18 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#if defined(HAVE_NBCOMPAT_H) +#include +#include +#else #include +#endif #ifndef lint __COPYRIGHT("@(#) Copyright © 2006 \ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: autocue.c,v 1.3 2007/02/24 12:16:12 agc Exp $"); +__RCSID("$NetBSD: autocue.c,v 1.4 2015/07/09 09:44:18 jperkin Exp $"); #endif #include @@ -143,7 +149,7 @@ main(int argc, char **argv) if ((fp = fopen(argv[optind], "r")) == NULL) { errx(EXIT_FAILURE, "can't open `%s'", argv[optind]); } - printf("send this process - %d - a USR1 to make the display go faster, a USR2 to make it go slower\n", getpid()); + printf("send this process - %ld - a USR1 to make the display go faster, a USR2 to make it go slower\n", (long)getpid()); for (cc = 0 ; fgets(line, sizeof(line), fp) != NULL ; ) { if (line[0] == '\n') { showbuffer(buf, cc, maxcut); -- cgit v1.2.3