summaryrefslogtreecommitdiff
path: root/media-libs/aalib/files/aalib-1.4_rc5-ncurses-opaque.patch
blob: 91271fba4f7f0898bc759d7b4e4dd4f1997b23cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
https://bugs.gentoo.org/932140
https://sourceforge.net/p/aa-project/patches/10/

Without the change build fails on ncurses-6.5 (enables opaque WINDOW by
default) as:

    aacurses.c: In function 'curses_getsize':
    aacurses.c:74:20: error: invalid use of incomplete typedef 'WINDOW' {aka 'struct _win_st'}
     74 |     *width = stdscr->_maxx + 1;
        |                    ^~
--- a/src/aacurses.c
+++ b/src/aacurses.c
@@ -71,8 +71,8 @@ static void curses_getsize(aa_context * c, int *width, int *height)
 {
     if (__resized_curses)
 	curses_uninit(c), curses_init(&c->params, NULL,&c->driverparams, NULL), __resized_curses = 0;
-    *width = stdscr->_maxx + 1;
-    *height = stdscr->_maxy + 1;
+    *width = getmaxx(stdscr);
+    *height = getmaxy(stdscr);
 #ifdef GPM_MOUSEDRIVER
     gpm_mx = *width;
     gpm_my = *height;