Build fails with ncurses >= 6.0-20170212
The liboping build on my MacBook currently fails with /opt/local/include/ncurses.h:110:9: error: 'NCURSES_OPAQUE' macro redefined [-Werror,-Wmacro-redefined].
This is because oping.c defines NCURSES_OPAQUE as 1 before including ncurses.h, which tries to define it as 0. Previous ncurses versions had a #ifndef NCURSES_OPAQUE guard around that define, but that has now been changed to #ifndef NCURSES_INTERNALS. Judging from Debian's Git repository (ncurses itself has no version control and older versions cannot be downloaded), the change happened with patch 6.0-20170212.
My setup:
- macOS 10.12.6
- ncurses 6.0-20171125 from MacPorts
- liboping 1.10.0
Why does oping.c #define NCURSES_OPAQUE 1? It was added in cce085e1e0cb19050cf69f6916558b2541ab793a without explanation. If I remove that line, it compiles fine for me.
https://mailman.verplant.org/pipermail/liboping/2017-May/000056.html
Maybe related to the terminal background change