Ubuntu 16.04ではncurses 6.0のコンパイルに失敗する

Ubuntu 16.04はgccのバージョンがデフォルトで5.4なので、そのままncursesをコンパイルしようとすると以下のように怒られます。 In file included from ./curses.priv.h:325:0, from ../ncurses/lib_gen.c:19: _30507.c:843:15: error: expected ‘)’ before ‘int’ ../include/curses.h:1631:56: note: in definition of ma…