Created attachment 187891 [details]
Do not add bogus macros to CFLAGS.
Some ports cannot be built with devel/ncurses because "pkgconf --cflags ncurses" adds "-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600" to CFLAGS via configure scripts. This may cause conflicts with ports' own CFLAGS and/or CPPFLAGS. For example, see bug 211973, comment 22. Actually, I found these flags are archaic from 5.x era and even harmful for all supported releases. I also verified that it generates the same binaries and works fine without the CFLAGS.
I agree with jkim there, it would be nice to upstream that change as well
Note that dragonfly probably deserves the same treatment as freebsd
A commit references this bug:
Date: Fri Nov 10 15:27:41 UTC 2017
New revision: 453902
devel/ncurses: do not pollute CFLAGS
Submitted by: jkim
It doesn't make sense to leave DragonFly to use -D_XOPEN_SOURCE=* given