slackware-current/source/a/gpm/gpm-1.20.1-weak-wgetch.patch

17 lines
513 B
Diff
Raw Normal View History

--- ./src/lib/libcurses.c.orig 2012-10-26 16:21:38.000000000 -0500
+++ ./src/lib/libcurses.c 2024-03-27 14:48:08.842064533 -0500
@@ -41,7 +41,12 @@
#endif /* HAVE_NCURSES_CURSES_H */
#endif /* HAVE_NCURSES_H */
-#define GET(win) ((win) ? wgetch(win) : getch())
+/* If win != NULL, it must have been created by ncurses anyway.
+ Avoid circular library dependencies. */
+#pragma weak wgetch
+#pragma weak stdscr
+
+#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
int Gpm_Wgetch(WINDOW *win)
{