diff -ruN qemu-122806/block-raw.c qemu/block-raw.c --- qemu-122806/block-raw.c 2006-12-22 09:19:53.000000000 -0500 +++ qemu/block-raw.c 2006-12-28 15:46:31.282932000 -0500 @@ -44,6 +44,8 @@ #endif #ifdef __sun__ +#define _POSIX_PTHREAD_SEMANTICS 1 +#include #include #endif #ifdef __linux__ diff -ruN qemu-122806/vl.h qemu/vl.h --- qemu-122806/vl.h 2006-12-24 12:12:43.000000000 -0500 +++ qemu/vl.h 2006-12-28 15:49:43.181801000 -0500 @@ -45,6 +45,10 @@ #define O_BINARY 0 #endif +#ifdef __sun__ +#define ENOMEDIUM 4097 +#endif + #ifdef _WIN32 #include #define fsync _commit