Avoid implicit declaration of function addnwstr.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 13 May 2015 20:36:26 +0000 (16:36 -0400)
committerNeal H. Walfield <neal@gnu.org>
Sat, 16 May 2015 10:52:21 +0000 (12:52 +0200)
* pinentry/pinentry-curses.c [HAVE_NCURSESW]: Include <ncursesw/curses.h>.
[! HAVE_NCURSESW]: Only include <curses.h> in this case.

--

When built with libncursesw, we see this problem:

pinentry-curses.c:440:8: warning: implicit declaration of function ‘addnwstr’ [-Wimplicit-function-declaration]
        ADDCH (start[i]);
        ^

pinentry/pinentry-curses.c

index 60fd9da..65a5a67 100644 (file)
 #include <config.h>
 #endif
 #include <assert.h>
+#ifdef HAVE_NCURSESW
+#include <ncursesw/curses.h>
+#else
 #include <curses.h>
+#endif
 #include <signal.h>
 #include <fcntl.h>
 #include <unistd.h>