$OpenBSD: patch-ppapi_proxy_image_data_cc,v 1.1 2011/03/15 11:38:05 robert Exp $ --- ppapi/proxy/image_data.cc.orig Mon Mar 14 13:16:56 2011 +++ ppapi/proxy/image_data.cc Mon Mar 14 13:17:29 2011 @@ -8,7 +8,7 @@ #include #endif -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_OPENBSD) #include #include #endif @@ -37,7 +37,7 @@ void* ImageData::Map() { #if defined(OS_WIN) NOTIMPLEMENTED(); return NULL; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_OPENBSD) struct stat st; if (fstat(handle_.fd, &st) != 0) return NULL; @@ -62,7 +62,7 @@ void* ImageData::Map() { void ImageData::Unmap() { #if defined(OS_WIN) NOTIMPLEMENTED(); -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_OPENBSD) if (mapped_data_) { struct stat st; if (fstat(handle_.fd, &st) == 0) @@ -77,7 +77,7 @@ void ImageData::Unmap() { #if defined(OS_WIN) const ImageHandle ImageData::NullHandle = NULL; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_OPENBSD) const ImageHandle ImageData::NullHandle = ImageHandle(); #else const ImageHandle ImageData::NullHandle = 0; @@ -86,7 +86,7 @@ const ImageHandle ImageData::NullHandle = 0; ImageHandle ImageData::HandleFromInt(int32_t i) { #if defined(OS_WIN) return reinterpret_cast(i); -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_OPENBSD) return ImageHandle(i, false); #else return static_cast(i);