summaryrefslogtreecommitdiff
path: root/contrib/nvi
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-06-06 02:23:03 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-06-06 02:23:03 +0000
commit781d8f4e7638e77445043bc007d455eb8c23676c (patch)
tree48838cf5b22b83defabce3a28d11c1ac3adc6dbb /contrib/nvi
parent5f26a41d17fad72b906fba72abcf986439bf3a22 (diff)
downloadsrc-test2-781d8f4e7638e77445043bc007d455eb8c23676c.tar.gz
src-test2-781d8f4e7638e77445043bc007d455eb8c23676c.zip
- Fix crash with ncurses on FreeBSD/amd64 CURRENT by including missing
header <term.h>, which is required by both tputs() and tgoto(). Without this header, nvi crashes with the call to tputs() at line 114. This is because the first argument of tputs() is a pointer, and the returned pointer from tgoto() is casted to an integer by compiler. For some reasons, this only crashes on amd64+CURRENT. On 6.x system, this does not happen. PR: 101248 Reported by: yar, infofarmer, Roland Smith Tested by: infofarmer, delphij, rafan Approved by: delphij (mentor)
Notes
Notes: svn path=/head/; revision=170356
Diffstat (limited to 'contrib/nvi')
-rw-r--r--contrib/nvi/cl/cl_screen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/nvi/cl/cl_screen.c b/contrib/nvi/cl/cl_screen.c
index 7f28aaaf6670..b4c2822c8c2f 100644
--- a/contrib/nvi/cl/cl_screen.c
+++ b/contrib/nvi/cl/cl_screen.c
@@ -20,6 +20,7 @@ static const char sccsid[] = "@(#)cl_screen.c 10.49 (Berkeley) 9/24/96";
#include <bitstring.h>
#include <curses.h>
+#include <term.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>