diff --git a/distinfo b/distinfo
index 3897ae5..007650e 100644
--- a/distinfo
+++ b/distinfo
@@ -20,3 +20,5 @@ SHA1 (patch-ak) = fabbf4d71aaa39fb77d2b51a6e0402500d825009
 SHA1 (patch-al) = d58a1800600ff1a124c3db7aa382b085218160f3
 SHA1 (patch-am) = a302a00bceff51e43b2af3299433f710917526c3
 SHA1 (patch-an) = ab36cdee3ecf1b374ce75780d310596cefe40152
+SHA1 (patch-ao) = 311a5a68fc2719b69d94eefbb1b1f4a1c1f7f41b
+SHA1 (patch-ap) = ab26309758d9a1abea8a9c580111fea6bffb9e1f
diff --git a/patches/patch-ao b/patches/patch-ao
new file mode 100644
index 0000000..70c9664
--- /dev/null
+++ b/patches/patch-ao
@@ -0,0 +1,12 @@
+--- platforms/unix/config/config.guess.old	2009-04-13 12:24:33 +0200
++++ platforms/unix/config/config.guess	2009-04-13 12:24:39 +0200
+@@ -744,6 +744,9 @@
+     *:BSD/OS:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ 	exit 0 ;;
++    i386:DragonFly:*:*)
++	echo ${UNAME_MACHINE}-pc32-dragonfly
++	exit 0 ;;
+     *:FreeBSD:*:*)
+ 	# Determine whether the default compiler uses glibc.
+ 	eval $set_cc_for_build
diff --git a/patches/patch-ap b/patches/patch-ap
new file mode 100644
index 0000000..4fc2719
--- /dev/null
+++ b/patches/patch-ap
@@ -0,0 +1,11 @@
+--- platforms/unix/config/config.sub.old	2006-04-05 19:40:24 +0200
++++ platforms/unix/config/config.sub	2009-04-13 12:28:45 +0200
+@@ -1106,7 +1106,7 @@
+ 	      | -aos* \
+ 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
++	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -dragonfly* | -riscix* \
+ 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
