os x changes
diff --git a/src/libmach/OpenBSD.c b/src/libmach/OpenBSD.c
new file mode 100644
index 0000000..3626e7c
--- /dev/null
+++ b/src/libmach/OpenBSD.c
@@ -0,0 +1 @@
+#include "nosys.c"
diff --git a/src/libmach/elfcorelinux386.c b/src/libmach/elfcorelinux386.c
index 18f8bdf..8fa74ab 100644
--- a/src/libmach/elfcorelinux386.c
+++ b/src/libmach/elfcorelinux386.c
@@ -4,6 +4,9 @@
 #include "elf.h"
 #include "ureg386.h"
 
+#undef errno
+#define errno	uregerrno
+
 typedef struct Lreg Lreg;
 typedef struct Status Status;
 typedef struct Psinfo Psinfo;
diff --git a/src/libmach/machpower.c b/src/libmach/machpower.c
index 701e9c6..141645a 100644
--- a/src/libmach/machpower.c
+++ b/src/libmach/machpower.c
@@ -570,7 +570,7 @@
 		bprint(i, "\tR%d,$%d,R%d", i->ra, i->simm, i->rd);
 }
 
-#define div qdiv
+#define div power_div
 
 static void
 div(Opcode *o, Instr *i)