]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setterm: fix term.h/ncurses.h include ordering
authorMike Frysinger <vapier@gentoo.org>
Sun, 29 Sep 2013 04:44:36 +0000 (00:44 -0400)
committerKarel Zak <kzak@redhat.com>
Mon, 30 Sep 2013 11:41:03 +0000 (13:41 +0200)
commitbfc4331b14ba15883951deac3f650461c6322714
treee474b680ada0e8f2c9fe0f18363d026205343be1
parent203c945a15378ed63c9f9219a3c9c56ce238031d
setterm: fix term.h/ncurses.h include ordering

The ncurses term.h header has logic in it to detect if nucrses.h has
already been included and void defining things when it has.  But since
setterm includes term.h and the ncurses.h, it doesn't work and we can
get fun build-time warnings like:

  CC       term-utils/setterm-setterm.o
In file included from term-utils/setterm.c:109:0:
/usr/include/ncursesw/ncurses.h:827:12: warning: redundant redeclaration of 'tigetflag' [-Wredundant-decls]
 extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);  /* implemented */
            ^
In file included from term-utils/setterm.c:106:0:
/usr/include/ncursesw/term.h:775:12: note: previous declaration of 'tigetflag' was here
 extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);
            ^

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
term-utils/setterm.c