- 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)
This commit is contained in:
Rong-En Fan 2007-06-06 02:23:03 +00:00
parent 5f26a41d17
commit 781d8f4e76
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170356

View File

@ -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>