b/games-libs/allegro/patches/0001-Fix-typo-preventing-get_executable_name-from-using-System-V-procfs.patch
new file mode 100644
index 0000000..473b08d
--- /dev/null
+++
b/games-libs/allegro/patches/0001-Fix-typo-preventing-get_executable_name-from-using-System-V-procfs.patch
@@ -0,0 +1,20 @@
+From cb670b9a856a1aaf6baf95b873e909f36e68688a Mon Sep 17 00:00:00 2001
+From: Peter Wang <tjaden AT users.sourceforge.net>
+Date: Tue, 13 Mar 2012 12:15:53 +0000
+Subject: Fix typo preventing get_executable_name from using System V procfs
+ correctly. Reported by Max Savenkov.
+
+
+diff --git a/src/unix/usystem.c b/src/unix/usystem.c
+index a8a171cc300b..3812c8e46e27 100644
+--- a/src/unix/usystem.c
++++ b/src/unix/usystem.c
+@@ -370,7 +370,7 @@ void _unix_get_executable_name(char *output, int size)
+ #ifdef ALLEGRO_HAVE_SV_PROCFS_H
+ sprintf (linkname, "/proc/%d/exe", (int)pid);
+ fd = open(linkname, O_RDONLY);
+- if (!fd == -1) {
++ if (fd != -1) {
+ ioctl(fd, PIOCPSINFO, &psinfo);
+ close(fd);
+
diff --git
a/games-libs/allegro/patches/0001-Include-stdio.h-for-printf-declaration..patch
b/games-libs/allegro/patches/0001-Include-stdio.h-for-printf-declaration..patch
new file mode 100644
index 0000000..e4a9be7
--- /dev/null
+++
b/games-libs/allegro/patches/0001-Include-stdio.h-for-printf-declaration..patch
@@ -0,0 +1,15 @@
+From cd8edcd7b360fe9991d679c06e5dab62eae65615 Mon Sep 17 00:00:00 2001
+From: Peter Wang <tjaden AT users.sourceforge.net>
+Date: Tue, 13 Mar 2012 12:16:28 +0000
+Subject: Include stdio.h for printf declaration.
+
+
+diff --git a/addons/logg/play_ogg.c b/addons/logg/play_ogg.c
+index da23da83dd52..f51a097faad9 100644
+--- a/addons/logg/play_ogg.c
++++ b/addons/logg/play_ogg.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include "logg.h"
+
+ int main(int argc, char** argv)
diff --git
a/games-libs/allegro/patches/0001-Make-internal-function-get_value-in-jpgalleg-static.patch
b/games-libs/allegro/patches/0001-Make-internal-function-get_value-in-jpgalleg-static.patch
new file mode 100644
index 0000000..8fac1cd
--- /dev/null
+++
b/games-libs/allegro/patches/0001-Make-internal-function-get_value-in-jpgalleg-static.patch
@@ -0,0 +1,19 @@
+From 71088c7ad2e7764d1aecdea2dbca9cd46cae18e8 Mon Sep 17 00:00:00 2001
+From: Trent Gamblin <trent AT nooskewl.ca>
+Date: Tue, 3 Jan 2017 12:36:10 -0700
+Subject: Make internal function get_value in jpgalleg static
+
+
+diff --git a/addons/jpgalleg/src/decode.c b/addons/jpgalleg/src/decode.c
+index 6d5510c6999c..db1b9f2fcf18 100644
+--- a/addons/jpgalleg/src/decode.c
++++ b/addons/jpgalleg/src/decode.c
+@@ -477,7 +477,7 @@ get_bits(int num_bits)
+ * Reads a string of bits from the input stream and returns a properly
signed
+ * number given the category.
+ */
+-INLINE int
++static INLINE int
+ get_value(int category)
+ {
+ int result = get_bits(category);
diff --git
a/games-libs/allegro/patches/0001-Remove-f-variants-of-fixed-math-functions.patch