Include the standard stdlib.h instead of the nonstandard malloc.h which does not exist on macOS. https://sourceforge.net/p/aa-project/bugs/4/ https://sourceforge.net/p/aa-project/bugs/7/ --- src/aados.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aados.c 2020-09-22 02:41:31.000000000 -0500 @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "aalib.h" #include "aaint.h" int __use_nearptr_hack; --- src/aadoskbd.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aadoskbd.c 2020-09-22 02:42:30.000000000 -0500 @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include --- src/aaedit.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aaedit.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,6 +1,6 @@ #include #include -#include +#include #include "aalib.h" #include "aaint.h" static void aa_editdisplay(struct aa_edit *e) --- src/aakbdreg.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aakbdreg.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,4 +1,4 @@ -#include +#include #include "config.h" #include "aalib.h" #include "aaint.h" --- src/aalib.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aalib.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,6 +1,6 @@ #include #include -#include +#include #include "aalib.h" #include "aaint.h" --- src/aalinux.c.orig 2001-04-26 09:43:56.000000000 -0500 +++ src/aalinux.c 2020-09-22 02:42:12.000000000 -0500 @@ -1,7 +1,6 @@ #include "config.h" #ifdef LINUX_DRIVER #include -#include #include #include #ifdef GPM_MOUSEDRIVER --- src/aamoureg.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aamoureg.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,4 +1,4 @@ -#include +#include #include "config.h" #include "aalib.h" #include "aaint.h" --- src/aarec.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aarec.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,5 +1,5 @@ #include -#include +#include #include "aalib.h" #include "aaint.h" aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL, --- src/aaregist.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aaregist.c 2020-09-22 02:41:31.000000000 -0500 @@ -1,4 +1,4 @@ -#include +#include #include "config.h" #include "aalib.h" #include "aaint.h" --- src/aax.c.orig 2001-04-26 09:37:54.000000000 -0500 +++ src/aax.c 2020-09-22 02:42:17.000000000 -0500 @@ -1,4 +1,3 @@ -#include #include #include #include --- src/aaxkbd.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aaxkbd.c 2020-09-22 02:42:27.000000000 -0500 @@ -1,4 +1,3 @@ -#include #include #include #include --- src/aaxmouse.c.orig 2001-04-26 09:37:31.000000000 -0500 +++ src/aaxmouse.c 2020-09-22 02:42:34.000000000 -0500 @@ -1,4 +1,3 @@ -#include #include #include #include