--- ld/ld.c.orig	2004-01-21 16:17:09.000000000 -0500
+++ ld/ld.c	2008-07-14 14:56:28.000000000 -0500
@@ -2,6 +2,9 @@
 
 /* Copyright (C) 1994 Bruce Evans */
 
+#include <errno.h>
+
+#undef BUGCOMPAT
 #include "syshead.h"
 #include "const.h"
 #include "byteord.h"
