$NetBSD: patch-ak,v 1.3 2006/01/04 20:35:08 joerg Exp $

- use standard headers
- don't declare own errno
- declare external symbols properly

--- src/keyboard.c.orig	1995-02-03 01:21:28.000000000 +0000
+++ src/keyboard.c
@@ -53,6 +53,7 @@ the Free Software Foundation, 675 Mass A
 
 #include <config.h>
 #include <stdio.h>
+#include <stdlib.h>
 #undef NULL
 #include "termchar.h"
 #include "termopts.h"
@@ -100,8 +101,6 @@ the Free Software Foundation, 675 Mass A
 /* Include systime.h after xterm.h to avoid double inclusion of time.h. */
 #include "systime.h"
 
-extern int errno;
-
 /* Variables for blockinput.h: */
 
 /* Non-zero if interrupt input is blocked right now.  */
@@ -301,7 +300,7 @@ Lisp_Object Vlast_event_frame;
 
 /* The timestamp of the last input event we received from the X server.
    X Windows wants this for selection ownership.  */
-unsigned long last_event_timestamp;
+extern unsigned long last_event_timestamp;
 
 Lisp_Object Qself_insert_command;
 Lisp_Object Qforward_char;
