[PATCH] avoid implicit declaration of function addnwstr

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 13 22:36:26 CEST 2015


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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 135d714..9f95bff 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -22,7 +22,11 @@
 #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>
-- 
2.1.4




More information about the Gnupg-devel mailing list