#!/bin/sh /usr/share/dpatch/dpatch-run
## 05-emdebian-wchar.dpatch by Neil Williams <codehelp@debian.org>
##
## DP: Ensure <wchar.h> is available for make_keys via gcc when cross-building
## DP: the rest of the package (otherwise it picks up the config.h for the
## DP: cross-build).

@DPATCH@

diff -Naurp ncurses.orig/ncurses/tinfo/comp_hash.c ncurses/ncurses/tinfo/comp_hash.c
--- ncurses.orig/ncurses/tinfo/comp_hash.c	2008-04-07 21:35:14.000000000 +0200
+++ ncurses/ncurses/tinfo/comp_hash.c	2008-08-04 23:26:50.000000000 +0200
@@ -39,6 +39,7 @@
  */
 
 #define USE_TERMLIB 1
+#include <wchar.h>
 #include <curses.priv.h>
 
 #include <tic.h>
diff -Naurp ncurses.orig/ncurses/tinfo/make_keys.c ncurses/ncurses/tinfo/make_keys.c
--- ncurses.orig/ncurses/tinfo/make_keys.c	2008-04-07 21:35:14.000000000 +0200
+++ ncurses/ncurses/tinfo/make_keys.c	2008-08-04 23:26:50.000000000 +0200
@@ -37,6 +37,7 @@
  */
 
 #define USE_TERMLIB 1
+#include <wchar.h>
 #include <curses.priv.h>
 
 MODULE_ID("$Id: make_keys.c,v 1.13 2007/01/07 00:00:14 tom Exp $")
