--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -54,6 +54,10 @@ extern "C" {
#include <ncurses_cfg.h>
+#if NEED_WCHAR_H
+#include <wchar.h>
+#endif
+
#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
#else