vp-build/srcpkgs/CPU-X/patches/musl-ctrl-not-defined.patch

16 lines
435 B
Diff

--- a/src/tui_ncurses.c 2021-10-07 14:38:03.886862860 -0400
+++ b/src/tui_ncurses.c 2021-10-07 14:49:43.258142532 -0400
@@ -262,6 +262,12 @@
/* Convert keys when an alternative mapping is used */
#define ALT_CODE 27
#define ALT(x) (x & ALT_CODE)
+
+/* glibc's term.h pulls in sys/ttydefaults.h which has it, but musl's does not. */
+#ifndef CTRL
+#define CTRL(x) (x&037)
+#endif
+
static int convert_char(int ch)
{
int i = 0;