Add additional system header #include directives for more
function prototypes.  This avoids implicit function declarations
and build failures with future compilers.

diff --git a/src/aafire.c b/src/aafire.c
index 4f36149aa84fba57..a59b5c5fa58e085b 100644
--- a/src/aafire.c
+++ b/src/aafire.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include "aalib.h"
 
 #define XSIZ aa_imgwidth(context)
diff --git a/src/aainfo.c b/src/aainfo.c
index d3f6d50f34590638..f4250ee37ae46134 100644
--- a/src/aainfo.c
+++ b/src/aainfo.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 
 #include "aalib.h"
 #include "aaint.h"
diff --git a/src/aakbdreg.c b/src/aakbdreg.c
index def65fe25646d75a..682616313c1b6ebd 100644
--- a/src/aakbdreg.c
+++ b/src/aakbdreg.c
@@ -1,4 +1,5 @@
 #include <malloc.h>
+#include <string.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
diff --git a/src/aalib.c b/src/aalib.c
index 11fecc8fe8ef6b59..1ef12c0dfa9026a4 100644
--- a/src/aalib.c
+++ b/src/aalib.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <malloc.h>
 #include "aalib.h"
diff --git a/src/aalinuxkbd.c b/src/aalinuxkbd.c
index c7f388abfe9e8c7f..ea988154518dfc8e 100644
--- a/src/aalinuxkbd.c
+++ b/src/aalinuxkbd.c
@@ -8,6 +8,7 @@
  */
 
 #include "config.h"
+#include <stdlib.h>
 #ifdef LINUX_DRIVER
 #include <sys/time.h>
 #include <sys/types.h>
diff --git a/src/aamoureg.c b/src/aamoureg.c
index 03808289eb59b928..6d807416ae0d3dc2 100644
--- a/src/aamoureg.c
+++ b/src/aamoureg.c
@@ -1,4 +1,5 @@
 #include <malloc.h>
+#include <string.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
diff --git a/src/aaregist.c b/src/aaregist.c
index 54abec0b9797533a..768b8ce29e286b00 100644
--- a/src/aaregist.c
+++ b/src/aaregist.c
@@ -1,4 +1,5 @@
 #include <malloc.h>
+#include <string.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
diff --git a/src/aasavefont.c b/src/aasavefont.c
index b00e1e6d7f181952..864ba225d5ef626c 100644
--- a/src/aasavefont.c
+++ b/src/aasavefont.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 #include "aalib.h"
 int main(int argc, char **argv)
 {
diff --git a/src/aatest.c b/src/aatest.c
index 9816f5d855134894..89933cfba6344270 100644
--- a/src/aatest.c
+++ b/src/aatest.c
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+#include <string.h>
 #include "aalib.h"
 int main(int argc, char **argv)
 {
diff --git a/src/aaxkbd.c b/src/aaxkbd.c
index f16afc63bb565512..44b91458b4bef3bc 100644
--- a/src/aaxkbd.c
+++ b/src/aaxkbd.c
@@ -7,6 +7,7 @@
 #include <X11/Xlib.h>
 #include <X11/keysymdef.h>
 #include <X11/keysym.h>
+#include <X11/Xutil.h>
 #include "aalib.h"
 #include "aaint.h"
 #include "aaxint.h"
