diff --git a/src/termcap.c b/src/termcap.c index c447ce8b4b0..472005f1393 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -23,11 +23,15 @@ Boston, MA 02111-1307, USA. */ #ifdef emacs +#include /* xmalloc is here */ /* Get the O_* definitions for open et al. */ #include -#ifdef USG5 +#ifdef HAVE_FCNTL_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif #else /* not emacs */ @@ -313,7 +317,7 @@ tputs (str, nlines, outfun) register int speed; #ifdef emacs - extern baud_rate; + extern int baud_rate; speed = baud_rate; /* For quite high speeds, convert to the smaller units to avoid overflow. */