1 From 95c99f69e026e8c57aecba545e51c97f3b284e75 Mon Sep 17 00:00:00 2001
2 From: "Gary E. Miller" <gem@rellim.com>
3 Date: Tue, 23 Jun 2015 14:36:26 -0700
4 Subject: [PATCH] Remove a BSD-ism.
6 CTRL('L') is a BSD-ism. CTRL() is defined in sys/ttydefaults.h
7 which does not always exist. Instead of adding scons tests for
8 needing CTRL() and its include files just replace with a simple
11 Needed for musl and found by Baruch Siach <baruch@tkos.co.il>
14 1 file changed, 5 insertions(+), 1 deletion(-)
16 diff --git a/gpsmon.c b/gpsmon.c
17 index c3001c8..58c8300 100644
20 @@ -583,6 +583,9 @@ static void select_packet_monitor(struct gps_device_t *device)
21 (void)wnoutrefresh(devicewin);
24 +/* Control-L character */
27 static char *curses_get_command(void)
28 /* char-by-char nonblocking input, return accumulated command line on \n */
30 @@ -591,7 +594,8 @@ static char *curses_get_command(void)
34 - if (c == CTRL('L')) {
36 + /* ^L is to repaint the screen */
37 (void)clearok(stdscr, true);
38 if (active != NULL && (*active)->initialize != NULL)
39 (void)(*active)->initialize();